Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my teleport script stretching the model??

Asked by 3 years ago

so, I have this script and for some reason, when I execute it. it only brings the humanoid root part. should I put it in a server script with a remote event??

script.Parent.MouseButton1Click:Connect(function()
    local player = game.Players.LocalPlayer
    player.Character.Position = Vector3.new(3043.361, 2699.429, -3100.891)
end)

2 answers

Log in to vote
1
Answered by 3 years ago

First thing, don't teleport players locally, as it won't be registered in server. Try adding remote Event and teleport the player in server side.

Second, In line 3, you should not use :

player.Character.Position

Instead, use:

player.Character.PrimaryPart.Position

And if will be using Remote Event, then put it in server side.

Lemme know if it helps!

0
Hey! Thanks for the answer :D as showed under here i think i already Figured that out, But hey! I know your answer works :D Galaxybombboy 134 — 3y
0
Glad to hear that! BestCreativeBoy 1395 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

I solved it in the question, put it in a RemoteEvent and made it server sided and it worked

Answer this question