im trying to make a tycoon game but for some reason the owner door isnt working. `` here is the script for people who are lazy to write it down
local tycoon = script.Parent.Parent
local mainitems = tycoon:FindFirstChild("MainItems")
local values = tycoon:FindFirstChild("Values")
mainitems.OwnerDoor.Door.Touched:Connect(function(hit)
if values.OwnerValue.Value == nil then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
if player:FindFirstChild("HasTycoon").Value == false then
values.OwnerValue.Value = player
end
end
end
end) ``
** You are now Level 1! **