Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Tycoon Owner Door?

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

✓ Accepted answer
--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)

This discussion is preserved as it was. New answers, comments, and votes are closed.