Character moves aimlessly on respawn

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

Thanks for all of your help and thank you @SkyWalk1n also, I really hope this will serve as a good enough fix until roblox can maybe get down to it (if it’s a platform bug :grimacing: ). Thanks again :smiley:

2 Likes

That’s pretty weird, should’ve worked the same way Either way, glad to see that my code was somewhat helpful in the end!

1 Like