tixy12Join Date: 2010-09-09 Post Count: 36 |
I am using Berezaa's tycoon kit and I cannot make a Owner Only Door for it. I have this script and if you can help me in any way please do so:
function onTouched(hit)
local owner = script.Parent.Parent.Parent.Owner
local h = hit.Parent:findFirstChild("Humanoid")
if (h ~= nil) then
if h.Parent.Name == owner.Value then
script.Parent.CanCollide = false
wait(2)
script.Parent.CanCollide = true
else h.Health = 0
end
end
end
script.Parent.Touched:connect(onTouched)
|
|
|
Search a good one in models, if you can't script. Do you know how to make it owner and worker? |
|
tixy12Join Date: 2010-09-09 Post Count: 36 |
What do you mean search a good one is models, like search for a Highly rated Owner Only Door? |
|
|
Yea.
How do you make it 2player, like 2PGFT? |
|
|
bereza's kit is different then the other kits. So to make it work you would have to change the local owner variable to where the owner is located in bereza's kit. |
|
|
How do I change that vairable? I see there is a Owner in the set but it has a value for the name. how do I read that line of Info in code. Cause if I can read that piece of data then its easy to script the door. the whole door depends on getting that value on Owner |
|
chimmihcJoin Date: 2014-09-01 Post Count: 17143 |
i can make one for you...
for a price...
...
...
...
...
...
...
credit for the door(maybe in the desc...) |
|
|
That's because in his kit, the owner is an object not a string.
So really you're trying to compare an object with a string which is never going to return true.
So, to work around this, try:
if h.Parent == owner.Value then
-- code here
end
if that doesn't work:
if h.Parent:GetPlayerFromCharacter() == owner.Value then
-- code here
end |
|
|
And I'm not going to charge you. You obviously need help with it and there's no point paying for something that someone can tell you for free.
Any problems, PM me |
|
|
I managed to fix that thanx. Here is my code so far
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")then
if script.Parent.Parent.Parent.Parent.Parent.Owner.Value ~= player then
print("Owner passed")
else hit.Parent.Humanoid.Health = 0
end
end
end)
I need help making a owner only button that only the tycoon owner can click |
|
chimmihcJoin Date: 2014-09-01 Post Count: 17143 |
OP
if you still need a working Owner Only door just ask and ill make one
|
|
|
I've managed with the door thank you. My door works 100% if I'm not the owner and i walk trough the door or even somehow over the pad then the person dies. If it's the owner then it disables the script and anybody can walk through. I had a clickdetector button but anybody could click on the button.
I really just need some guidance with making the button only clickable by the owner.
|
|
chimmihcJoin Date: 2014-09-01 Post Count: 17143 |
i can also make that for you :) |
|
|
Please. Will you make it for me. If you want to you can PM me the link once you are done. Will give credit for your contribution to my game once it's done. I am missing one or 2 lines of code and I just can't seem to figure it out. Also can you add best friend of owner or now friend of the owner. So that The tycoon owner and his best friends can go through without dying.
Thank you so much ~Z~ |
|
chimmihcJoin Date: 2014-09-01 Post Count: 17143 |
dude your gonna have to make a model of the tycoon so i can make it right
pm the link |
|
|
Please may you make me a door that only I can pass through and please send the link when you have finished, thank you |
|
|
I have been inactive for a while due to internet problems. I am going through all my work and posting some of my work. I will post here once I am fully back at work. I have fixed some of the problems I had but I forgot them. So I will have to go through all my work and notes to pick up where I left.
|
|
TigeonJoin Date: 2013-05-24 Post Count: 4222 |
solution: dont use berezaas fake tycoon kit
𝐓𝐞𝐥𝐥 me, did you fall from a shooting star, one without a permanent scar? |
|