Hello! im scripting an Car Spawner. But im not sure why the script is not working.
I want make, that if you click at the button, that a cloned car from the ServerStorage the Name from the player has (Owner).
May someone can help me
My script:
local Button = script.Parent.Parent.Button
local player = game:GetService("Players").localPlayer
Button.MouseButton1Click:Connect(function()
local enabled = false
if enabled == false then
enabled = true
local Mod = game.ServerStorage['AudiS3']
local clone = Mod:clone()
clone.Parent = workspace
clone:MakeJoints()
clone.Name = player.Name.. "s AudiS3"
wait(15)
enabled = false
end
end)

1 comment
The Car Spawns currently with the Name "AudiS3" in the Workspace. And if im set the (Clone.Name = player.Name.. "s AudiS3") over the (Clone.Parent = workspace), then the car dosnt spawn