#how can i stop telporting from this script
4 messages · Page 1 of 1 (latest)
local Players = game:GetService("Players")
local checkpoint = script.Parent.Sender
local cool = false
function onTouched(hit)
if hit and hit.Parent and hit.Parent:FindFirstChildOfClass("Humanoid") then
if cool == false then
cool = true
local player = Players:GetPlayerFromCharacter(hit.Parent)
local userIdString = tostring(player.UserId)
local plr=hit.Parent
local Wins=player.leaderstats.Beans
local Stage=player.leaderstats.Stage
Stage.Value+=1
Wins:GetPropertyChangedSignal('Value'):Connect(function()
if Wins.Value>=200 then
task.wait(1)
cool = false
end
end)
end
end
end
checkpoint.Touched:Connect(onTouched)
heres the same code but with the teleporting part removed.
Ok I’m goin to try it