Exactly as the title says. How exactly would i give my tycoon door an ontouch thing (Nub to scripting)
COMMUNITY QUESTION
How do i give my tycoon door an owner or make it only unique to a player ?
1 answer
You would want to use the .Touced event and check if the part that touched the door is the player that owns the place.
I'm assuming you have no knowledge with scripting, so please if you don't learn first.
door.Touched:Connect(function(hit) --that hit will be the object that touched the door
if hit.Parent == "starmaq" then -- this will check if the hit's parent is the player you want, we check if the parent is the player not the hit because the hit is a bodypart of the player, and bodyparts are parented to the player, that's why we check the parent
--and put the code you want here
end
end)
1 comment
0
.Touched*
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Used the Touched event from a BrickPart and some simple if-checks. Make an attempt for further help.
You have to explain more do you want the player to have the door when the player starts or when the player clicks. You could also want a key or they are in when they click a button so I dont know how to make it.