while true do
wait(10)
local player = script.Parent.Parent.Parent.Name
local check = game.Workspace.Checkpoint1:FindFirstChild(player)
if check == nil then
if game.Workspace:FindFirstChild(player).Humanoid.LocalBin == nil then
script.Parent.Disabled = true
script.Disabled = true
elseif game.Workspace:FindFirstChild(player).Humanoid.LocalBin ~= nil then
game.Workspace:FindFirstChild(player).Humanoid.LocalBin:Destroy()
script.Parent.Disabled = true
script.Disabled = true
end
end
end
there is a problem with this 'while true do'. when this script is active it looks for the checkpoint in workspace and if there is no player name in there it deletes the localbin and then the script gets disabled. but when its active again it only gives around 5 seconds or below instead of 10. is there another way i could do this script?

3 comments
A script cannot re-enable itself after it has been disabled, obviously. It's like trying to get a dead body to re-animate itself.
wait i will make a game to show you. idk it might be just me but can you follow?
Panther has a point, you once a script has been disabled, it stops, and nothing inside of it will run. You need a seperate script to re-enable the script