Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

Tycoon Owner Door?

Asked by 8 years ago

I have looked everywhere Even on the wiki I need to find away so that the door open if the are the person who purchased the house so I know I would make a BoolValue or A IntVlaue and place it in the player but how could I script like but I'm going to have like 5 owners tags how would it know which one?

local Player = game.Players.IllDotHISlATER:FindFirstChild("Owner")
if Player then

end

1 answer

Log in to vote
1
Answered by 8 years ago
--put this in the button

local owner = nil
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Money") then --make sure there is a value called Money in the player
if hit.Parent.Money.Value == 500 then
script.Parent.Owner.Value = hit.Parent.Name --Make sure there is a string value called owner in the button
end
end
end)
Ad

Answer this question