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

Why would the car spawn when I click the button?

The code is in a Local Script

local model = game.ServerStorage.Dew

function click()
	
	newModel = model:Clone()
	newModel.Parent = workspace
	newModel:makeJoints()
	script.Parent.Parent.Parent:Destroy()
end

script.Parent.MouseButton1Click:connect(click)

2 answers

✓ Accepted answer

I don't really know the path of the actual script but I will try my best to answer.

local model = game.ServerStorage.Dew -- game:GetService("ServerStorage").Dew

function click() -- nil value

    newModel = model:Clone()
    newModel.Parent = workspace -- game.workspace
    newModel:makeJoints()
    script.Parent.Parent.Parent:Destroy() -- check how many parents the script has
end

script.Parent.MouseButton1Click:connect(click)

It’s spawned but you need to position the car in a spawn point if you look in explorer the car will be there

1 comment

0

I don't get what you mean, I already position it.

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