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

How do i Allow the player to touch the part and claim it?

local Door = script.Parent
local owned = false
Door.Touched:Connect(function(i)	
print(i.Parent)	
if not owned and i.Parent:FindFirstChild("Humanoid") then	
	Door.Transparency = 1		
	Door.CanCollide = false	
	Door.Parent.Name = i.Parent.Name.."'s Tycoon"
	end
end)

1 comment

0

this doesnt really tell us anything, are there any errors when you run this script?

1 answer

✓ Accepted answer

you need to set the owned

local player = game.Players:GetPlayerFromCharacter(i.Parent)
if player then
	owned = player
end

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