Character moves aimlessly on respawn

To add on to this, here’s an example of what happens with low hipheight

The default value is 2.04 if you were wondering

1 Like

as for road collisions those are fine, and the spawns are anchored. I do notice that this has a smaller occourance when I press “Play” rather than “Play here” which makes sense, since my game has a custom spawning system. But this also happens outside of studio when players play the game, so it’s still possible.

Does it have to be every animation? If so that might be difficult for me to do at the moment, but if it’s just one animation I could probably change it.

I’ll definitely look into whether or not my character retains this hip height throughout the issue, I’ll update once I test!

I’ve only seen it happen with the Old School animation and your animation.

Here are some posts that migh help you out:

It happened to my sister in Royale High and in my game. I didn’t change the HipHeight in my game, so it’s not the HipHeight.

1 Like

Actually I did check the hip height, and it was default, but when I changed it to a number like 10 and then back to two, the character was perfectly fine! I’m not sure why it initially happens, and maybe it is the animation, but I don’t have the resources to get animations made for my game, and honestly this is something I’d like to prevent from the start of the problem.

Can’t you just change your animation to the default?

1 Like

ohh I understand, yeah I could but my game is RP and I want players to have whichever walk style they’re used to :man_shrugging:

Ah, I see.

game:GetService("Players").PlayerAdded:Connect(function(player)
     player.CharacterAdded:Connect(function(character)
        character:WaitForChild("Humanoid").HipHeight = 10
        wait() -- amount of time
        character:WaitForChild("Humanoid").HipHeight = 2.04
    end)
end)

Something like this might work, make sure to double check the code since I wrote it from the top of my head

1 Like

I don’t see what you’re saying. Go to the roblox avatar editor and unequip your animations.

1 Like

yeah but this would serve as a Huge inconvenience to anyone who’s new to roblox/new to my game.

No, that’s not how it works, if they wanted to reset the animations, they easily could do it with game settings. But I’m pretty sure the code I provided should work WITH their animations

1 Like

Are you saying that you have a custom animation? Also, if you don’t want this happening to your players, I don’t think there is a better way to stop it. It can happen in pretty much any game I think. It’s not that common, so I don’t think you should worry about that much. I think this is just a roblox bug.

I tried using this script and for some reason it still doesn’t fix anything. I’ll check out the other posts you linked, maybe those will have something in it.

1 Like

If it’s a roblox bug then they need to fix it because it’s a pretty annoying issue, and as for stopping it i’m sure there is a way, as I did fix it via changing hip height, but the script @SkyWalk1n didn’t work, which makes me think maybe I’ll have to try using it a different way.

Not sure what else to suggest, maybe delete the spawn location and add a new one?

You can message @Bug-Support to report a bug if you’re not a regular.

1 Like

I’ve found a solution! I basically added a wait in front of the code that you wrote to see what happened, and so far I haven’t run into the same issue!

game:GetService("Players").PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		
		
		wait(5) -- Or whichever number suits your game best (Nothing below 2) 

-- Prints are optional

		--print(character:WaitForChild("Humanoid").HipHeight)
		character:WaitForChild("Humanoid").HipHeight = 10
		--print(character:WaitForChild("Humanoid").HipHeight)
		wait(1) -- amount of time
		character:WaitForChild("Humanoid").HipHeight = 2.04
		--print(character:WaitForChild("Humanoid").HipHeight)
		print("Done")
		--print(character:WaitForChild("Humanoid").HipHeight)
	end)
end)
1 Like