How can I detect if a player is off a part? (I used the touch event)
1 Like
local sp = script.Parent --Always use this in scripts that repeat script.Parent more than once. I use it in every script because it's my personal preference
sp.TouchedEnded:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
--hit.Parent is their character
--plr is their player
end
end)
3 Likes
Seriously? TouchedEnded? I was looking for such function damn YEAR, thank you a lot
isn’t it suppose to be TouchEnded
?