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

HOW TO SPAWN A CAR FROM SERVER STORAGE?

Asked by 3 years ago

local Debounce = false script.Parent.MouseButton1Click:connect(function(GetCar) if Debounce == false then Debounce = true Mod = game.ServerStorage.RedCar clone = Mod:clone() clone.Parent = workspace clone:MakeJoints() wait(5) Debounce = false end end)

0
important parts are in caps aar15089 0 — 3y
0
Please use code blocks for your code. 2_MMZ 1059 — 3y

2 answers

Log in to vote
0
Answered by 3 years ago

local Debounce = false script.Parent.MouseButton1Click:connect(function(GetCar) if Debounce == false then Debounce = true Mod = game.ServerStorage.RedCar clone = Mod:clone() clone.Parent = workspace clone:MakeJoints() wait(5) Debounce = false end end)

Ad
Log in to vote
0
Answered by 3 years ago

found many script errors, your script is a bit messy (no offence), so I fixed it, hope it works

local Debounce = false 
script.Parent.MouseButton1Click:connect(function(GetCar) 
    if Debounce == false then 
        Debounce = true 
        Mod = game.ServerStorage.RedCar:Clone()
        clone.Parent = workspace
        clone:MakeJoints()
        wait(5) 
        Debounce = false 
    end 
end)
0
btw, that has to be a normal script (server script), and not a local script or the whole thing will not work NGC4637 602 — 3y

Answer this question