Player is invisible when teleported

Hello DevForum! I have had this problem for a long time, sometimes when a player get’s teleported he will become invisible for other players, I could never figure it out.

script.Parent.Touched:Connect(function(hit)
	local player = hit.Parent
	if player and player:FindFirstChild("Humanoid") then
		player.HumanoidRootPart.Position = Vector3.new(-218.1, 47, 66)
	end
end) ```

What do you mean by invisible? Can you show any videos? The code looks fine.

could you provide a video? also try this

script.Parent.Touched:Connect(function(hit)
	local Humrt = hit.Parent:FindFirstChild("HumanoidRootPart")
	if Humrt  then
		Humrt.Position = Vector3.new(-218.1, 47, 66)
	end
end) ```

Try using PivotTo() on the character instead of Position, as characters and limb positioning using this property do not like eachother.

@abbyhaffizi your script isn’t doing anything different meant to edit the above reply

i know but. i think the codes that he did looks fine . he need to send a video

Its likely because of this, here you are only moving the HumanoidRootPart to a set Position instead of Moving the Entire Character Along with it, try MoveTo to move the entire Model:

player:MoveTo(Vector3.new(-218.1, 47, 66))

However, Dont get it confused with Humanoid:MoveTo(), Model:MoveTo() is a Different thing.

Like what @Tavikron Said, you can also use PivotTo

MoveTo will Move the Model with Vector3
PivotTo will Move the Model with CFrame

2 Likes

He doesnt have to, when testing on Studio this code, after stepping on the Part, Check the Current Server and you’ll not find the Player at all.
PivotTo and MoveTo appear to fix that issue

1 Like

oh! thx for the guide i got some question . which one is better ? set the primary part cframe or set the rootpart cframe?

SetPrimaryPartCFrame is deprecated and PivotTo is basically the Better version

The PrimaryPart is the HumanoidRootPart.

2 Likes

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