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

Why cant i sit in the car when its cloned?

Asked by 5 years ago

I made a button, that clones your car in front of you. But if i clone it in studio, it works but in game i cant sit in it. whats the problem?

script:

local debounce = false
local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
       if not debounce then
    for i,v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
        if v:IsA("Model") then
        v:Destroy()
        end
    end
    wait(0.1)
         local car = plr.SelectedCar.Value:Clone()
        car.Parent = game.Players.LocalPlayer.Character
        car.Name = plr.Name..("'s Car")
        car:SetPrimaryPartCFrame(plr.Character.Head.CFrame * CFrame.new(0,0,-10))
        car:MakeJoints()
        debounce = true
        wait(1)
        debounce = false
    end
end)
0
Is this in a regular script or a localscript? BlauKitten 88 — 5y
0
localscript ieatandisbaconhair 77 — 5y
0
Is the button in the Workspace or the PlayerGui? BlauKitten 88 — 5y
0
playergui/startergui ieatandisbaconhair 77 — 5y
View all comments (5 more)
0
Are you sure the car has a vehicle seat? mixgingengerina10 223 — 5y
0
Yes, it works at studio, but not ingame. i checked the explorer, i still cant get it ieatandisbaconhair 77 — 5y
0
"it works in studio but not in game ". When you say that, you have failed client to server replication. In other words, your game is not FE compatible User#19524 175 — 5y
0
what does that mean= ieatandisbaconhair 77 — 5y
0
Look at this tutorial to understand: https://www.youtube.com/watch?v=C0qQ4lDa3t0 Oficcer_F 207 — 5y

Answer this question