I’m trying to do a game where you start with a car and you can’t exit (like the old car games, like Test Drive Unlimited for example)
I want the car to be a simple car with a Vehicle Seat instead of a scripting a custom car.
The problem is that I can’t make the player sits on the car when the player spawns.
I tried to make the player when spawns, the car spawns and he teleports to it, but I can’t make it to sit when is teleported, there’s a way to force sitting?
Script that I made:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
task.wait(2)
local car = game.ReplicatedStorage.Car:Clone()
car.Parent = workspace
car.VehicleSeat.Anchored = true
task.wait(1)
char.Humanoid.JumpHeight = 0
char.HumanoidRootPart.CFrame = car.VehicleSeat.CFrame + Vector3.new(0,4,0)
char.Humanoid.Sit = true
task.wait(2)
car.VehicleSeat.Anchored = false
end)
end)