Hey, I was wondering how I'd make it so once a player touches a part the player moves ina position using c frame (e.g. facing forward), how would I do this? :)
1 | local player = game.Players.LocalPlayer |
2 | local char = player.Character |
3 | local where = Vector 3. new( 0 , 0 , 0 ) |
4 |
5 | char:MoveTo(where) |
1 | --This should move your character for the whole server instead locally. |
2 |
3 | script.Parent.Touched:Connect( function (hit) |
4 |
5 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
6 |
7 | hit.Parent.HumanoidRootPart.CFrame = Vector 3. new( 0 , 0 , 0 ) --Place your position |
8 |
9 | end ) |