Issue With Moving Player

Hello! I’m a dev working on an infection-type game that involves trapping monkeys in cages to capture them. However, I’m having an issue moving the monkey from the catcher’s shoulder into the cage. I’ve never had an issue like this before, so any help is appreciated.

  1. When trying to teleport the monkey into the cage, the monkey moves on every client except the client of the monkey.

Monkey POV

Server and other POVs

  1. I’ve tried recoding the entire script to see if that helps, and I’ve looked on the developer forums, but no one has had a similar problem, from what I’ve found.

Like I said previously, any help is appreciated. If I need to clarify anything, please let me know. The code is shown below.

	-- Positioning
	monkeyChar.MonkeyWeld:Destroy()
	stopAnims(monkeyChar)
	monkeyChar.Humanoid:ChangeState(14)
	collision(monkeyChar,false)
	monkeyChar.HumanoidRootPart.Anchored = true
	monkeyChar.HumanoidRootPart.CFrame = script.Parent.CFrame
1 Like

Is this on a server script?

Hmmm, try replacing the CFrame line with:

monkeyChar:PivotTo(script.Parent.CFrame)

Same result :frowning: and yes this is a server script.

Okay this is going to be a little bit weird, but try this…?

task.spawn(function() -- im just putting this here so it doesnt yield
	for i = 1,1000 do
		monkeyChar:PivotTo(script.Parent.CFrame)
		warn(monkeyChar:GetPivot().Position)
		task.wait()
	end
end)

During this loop, check the client and see if the character still isn’t moving right?

And also, check if the position of the character on the client is the same as the outputted position on console.

It’s still not moving right. Its position value is not changing on the client. Should I just move the player with a separate client script as well?

1 Like

Hmmmm, that’s quite odd…

Y’know what, try setting the character’s network owner to nil (the server) inside the loop – see if that does anything?

This worked! I just had to make some changes because you can’t change network ownership of anchored parts. Thank you for your help, I appreciate it.

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