local PlayerName = plr.Name
PlayerClimbing[PlayerName] = true
task.spawn(function()
print("spawned " .. PlayClimbAnimation[PlayerName].Length)
task.wait(PlayClimbAnimation[PlayerName].Length - 0.001)
print("passed " .. PlayerClimbing[PlayerName])--nil
if PlayerClimbing[PlayerName] then --PLAYERCLIMBING IS CONSIDERED NIL EVEN IF IT'S DECLARED TRUE BEFORE
local savePos = PlayerTorso.Position
PlayerTorso.Position = savePos
end
end)
when i declare on PlayerClimbing table a player’s value to true and check it on the task.spawn, inside of it the variable is always nil, any idea of how to check it? (playerclimbing value can change on the middle of the Wait’s)
maybe stuff the PlayerClimbing variable into the parameter of the function inside task.spawn?
task.spawn(function(PlayerClimbing)
print("spawned " .. PlayClimbAnimation[PlayerName].Length)
task.wait(PlayClimbAnimation[PlayerName].Length - 0.001)
print("passed " .. PlayerClimbing[PlayerName])--nil
if PlayerClimbing[PlayerName] then --PLAYERCLIMBING IS CONSIDERED NIL EVEN IF IT'S DECLARED TRUE BEFORE
local savePos = PlayerTorso.Position
PlayerTorso.Position = savePos
end
end)