You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I’m trying to achieve this simple car spawner to limit to one vehicle a person, and if the person already spawned a vehicle then tries to spawn another. It shall despawn the last one, and respawn a new one. -
What is the issue? Include screenshots / videos if possible!
I can’t figure out how to produce what I want. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Yes I did, the solutions I saw did not help me with my script.
script.Parent.MouseButton1Click:connect(function(GetCar)
local Mod = game.ServerStorage.Cars.MRAP
local clone = Mod:clone()
clone.Parent = workspace
clone:MakeJoints()
end)
Mainly I couldn’t find out how to detect if the player already spawned a car.