I mean, like :
script.Parent.Touched:connect(function(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then
while ??? do
--Something
end
end
end)
script.Parent.TouchEnded:connect(function(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then
--Do something that will cancel that upper while loop on line 4
end
end)
Get it?
