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 make it so when you touch the part a script runs?

pls help me im trying to create a island unlocker

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

1 comment

0

TYSM

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