pls help me im trying to create a island unlocker
✓ ANSWER ACCEPTED
how do i make it so when you touch the part a script runs?
1 answer
✓ Accepted answer
part.Touched:Connect(function(hit) -- The part that hit it
--run Some code
end)
if you want to retrieve the player you can do:
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then --Any part can touch it
end
-Ducky
Developer
Youtuber
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
TYSM