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

My script to move the player doesn't work?

Asked by
lucas4114 607 Moderation Voter
9 years ago

So, I'm trying to move a player somewhere when the touch a part named "Hitbox" and I made this but it doesn't work... And idk why..

function inHitbox (Player)
    Player.Parent.Torso:MoveTo (script.Parent.Parent.MainPart.Position)
end

script.Parent.Touched:connect(inHitbox)

1 answer

Log in to vote
0
Answered by
funyun 958 Moderation Voter
9 years ago

I believe MoveTo is a function for models that moves the PrimaryPart of that model to the designated Vector3 position, so you'd just do Player.Parent instead of Player.Parent.Torso.

0
Well if that is the case, what is the purpose of :SetPrimaryPartCFrame()? EzraNehemiah_TF2 3552 — 9y
Ad

Answer this question