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

When I clone Roblox Car, I cannot drive it, whilst I can in-game testing. Help?

Asked by 5 years ago

I am kind of new to coding, only got into it 6 months ago. My problem here is, when I clone my car, the driver seat doesn't operate. I'm using a default Roblox Car which works when I use it manually, when I am testing my game.

game.ReplicatedStorage.SpawnCar.OnClientEvent:Connect(function(banana)
    --equippedCar is the equipped car from the shop I made seperatley (it works fine)
    local equippedCar = script.Parent.Parent.Parent.Shop.EquippedCar.Value
    print(equippedCar)
    local car = game.Workspace.CarModels[equippedCar]:Clone()
    car.Parent = workspace
    local pos = player.Character.HumanoidRootPart.Position + Vector3.new(3,3,0)
    car:MoveTo(pos)
end)

The roblox car, when cloned, the wheels sink into the baseplate and when I jump onto it, which should have enabled the DriveSeat. It instead doesn't do a thing and rotates around pointlessly. I have also noticed that when it rotates, the wheels stay rigid. They are not anchored and can collide is off. The in-game, non-cloned roblox car also have the same properties, meaning that CanCollide being off is not a issue.

Please help

-WarmFireBlaze1

0
Also when teleported, it runs off automatically without any push WarmFireBlaze1 15 — 5y
0
I think u need to change the anchor point for the car to the seat or the opposite dr6g0nb0y 27 — 5y

Answer this question