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

How can I teleport a vehicle seat while a person is in, and keep them in it?

Asked by 6 years ago

I have a vehicle, (Which is a model) and I want to move the entire vehicle while a person is sitting in it, While keeping them in the seat.

1 answer

Log in to vote
0
Answered by
PlaasBoer 275 Moderation Voter
6 years ago
Edited 6 years ago

What you want to do is in studio choose a part in model as primary part

Then use one of model api functions :MoveTo()

local myCar = game.Workspace.MyCar --just an example

maCar:MoveTo(Vector3.new(0,0,0)) --moves to the center of the map

--You can also use the cframe one
maCar:SetPrimaryPartCFrame(CFrame.new(0,0,0)) 

Remember to 1.Set car model primary part.

Read more about primary part->http://wiki.roblox.com/index.php?title=API:Class/Model/PrimaryPart

and model api-> http://wiki.roblox.com/index.php?title=API:Class/Model

Ad

Answer this question