I'm using a local script to move both the local player's character and other players' characters. To do this, I'm changing the position of their humanoid root part. For some reason, this only works with the local player's character, while other player's humanoid root parts are teleported but the characters are left behind.
char.HumanoidRootPart.Position = tileGrid:FindFirstChild("PlayerStart"..playerInt.Value).Position + Vector3.new(0,8,0)
This is the bit that moves the local player's root part.
for i,v in pairs(Players:GetChildren()) do --creates a clientside model of other players already in the game
if v:WaitForChild("PlayerInteger").Value ~= playerInt.Value then
print()
if otherPlayer1 == nil then
game.workspace:WaitForChild(v.Name).HumanoidRootPart.Position = tileGrid:FindFirstChild("PlayerStart"..otherPlayerInt1.Value).Position + Vector3.new(0,8,0)
end
end
end
And this is the bit that teleports the root part of the other player. Note that the root part is teleported fine, only the character is left behind. Also, whenever I animate the other character's root part (the animation is a simple arc to make the character look like they are jumping) later in the script, the character moves up and down with the root part, although it is in the wrong position because it didn't teleport initially.
I'm wondering if this is just a bug of trying to use local scripts to manipulate other players' characters other than the local player, and if there are any workarounds to this. Or maybe something is wrong with my code. Hope somebody has an idea
EDIT: I cut the question down to just the bare essentials of what I'm asking

2 comments
You can only teleport your own character using a local script. If you want to teleport other player's characters from a local script, then you'd have to use a remote event to tell the server.
Also, you teleport characters using :Move(position). You can also do Character:SetPrimaryPartCFrame(part.CFrame) as well.