This is what I tried but the model teleports to a place It cannot be found
1 | local glider = game.Workspace.DefaultGlider:Clone() |
2 | wait ( 2 ) |
3 | glider:MoveTo(Vector 3. new(game.Players.LocalPlayer.Character.Head.CFrame * CFrame.new( 0 , 5 , 0 ))) |
Thing is: You can't a construct a Vector3 with a CFrame, and you haven't set the parent of the glider
Also, I recommend using SetPrimaryPartCFrame, since MoveTo has collision detection and will position the part above a part, if a part is in the way.
You should note that SetPrimaryPartCFrame can only be used when the Primary part is set, else it'll error. You should preset it in studio
1 | local glider = workspace.DefaultGlider:Clone() |
2 | wait( 2 ) |
3 | glider:SetPrimaryPartCFrame(game.Players.LocalPlayer.Character.Head.CFrame * CFrame.new( 0 , 5 , 0 )) |
4 | glider.Parent = workspace |
I recommend Using 'Cframe.new' instead of 'Vector3.new'
If that model is supposed to be a ncp then use their torso with
1 | torso.CFrame = CFrame.new(X,Y,Z) |
1 | local glider = workspace.DefaultGlider:Clone(); |
2 | wait( 2 ) |
3 | glider:MoveTo(game.Players.LocalPlayer.Character.Head.Position+Vector 3. new( 0 , 5 , 0 )); |
Try this