HumanoidRootPart position isn't changing

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want the player’s humanoid root part to teleport to a location

  2. What is the issue? Include screenshots / videos if possible!
    The humanoid root part’s isn’t changing

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I googled some stuff and they didn’t work.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

--//VARIABLES\\--
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Assets = ReplicatedStorage.Assets
local Debris = game:GetService("Debris")
local Animations = Assets.Animations
local Events = Assets.Events

--//FUNCTIONS\\--
function Destroy(object : Instance)
	Debris:AddItem(object, 0)
end


-- basically some random guy will be teleported to a "place".
-- places in my game are basically maps separated and placed far away from the map.
-- when some stuff happens a random player can be teleported to a place

Events.StartPlaceFunctions.Event:Connect(function(place : Instance, player : Player)
	if place.Name == script.Parent.Name then
		Events.StartPlaceFunctionsToClient:FireClient(player)
		
		local character = player.Character
		
		local hrp = character:WaitForChild("HumanoidRootPart")
		hrp.Anchored = false
		print(hrp.Name)
		
		-- character's position didn't change
		hrp.Position = script.Parent.SpawnPlace.Position
		
		local humanoid = character:FindFirstChildWhichIsA("Humanoid")
		humanoid.WalkSpeed = 16
	end
end)
1 Like

I think the problem occured because the player was actually attached to a mesh part doing an animation so it somehow messed up the HRP?

I solved the problem by refreshing the player

player:LoadCharacter()
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.