Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

HOW TO SPAWN A CAR FROM SERVER STORAGE?

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)

2 comments

0

important parts are in caps

0

Please use code blocks for your code.

2 answers

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)

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)

1 comment

0

btw, that has to be a normal script (server script), and not a local script or the whole thing will not work

This discussion is preserved as it was. New answers, comments, and votes are closed.