I have a script that is dependent on the player's position. it works fine, but when I die and respawn the player's position freezes and pretty much stays on the position they either died or went to reset from.
Is there a way to reset this? I am using Roblox's built in Reset so I honestly don't know what to do.
this is in StarterGUi
print("CHARACTER POSITION: ", character.HumanoidRootPart.Position)
This was simply for debugging. When I first start, it constantly changes when I move around. But when I respawn/reset, I notice that it never changes, and the script is running over and over. The position is stuck.
Is there a way to fix this? Like say that when the player resets or dies I fix the HumanoidRootPart position?

7 comments
this happens because after death the character becomes "null", try to update the variable after death, maybe it works
Is it the same for reset?
Wait, this doesn't make any sense. How does my character become "null"? After reseting or dying and respawning I'm still able to be attacked and wear armor, and those are dependent on the character. I'm going to try using the player's head instead or something, I hope that one ain't bugged too. This is honestly frustrating and I don't why this bug still exists.
Alright I solved it using some remote events/functions. The server appears to know they've reset and can still follow the position, so I just sent that back to this script.
I think what HasteeD was saying is that when the player dies they become Nil, nothing, and theres no longer a humanoid to get the position of. When they reset the script continues to track the "nil" characters location.
What happens when you reset is that your character gets destroyed and is cloned in as a new character when you respawn. So the original hrp you are referencing doesn't exist anymore, it's a whole new hrp
I tweaked my answer slightly, has this worked?