Car = game.Workspace["Nissan 240SX(Car)"]
function OnTouched(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) then
for _,Player in pairs(game.Players:GetPlayers()) do
if Player:FindFirstChild("leaderstats") then
if Player.leaderstats.Money.Value > 68000 then do
Player.leaderstats.Money.Value = Player.leaderstats.Money.Value -68000
if game.Players:GetPlayerFromCharacter(script.Parent)then do
local Clone = Car:Clone()
Clone.Anchored = false
Clone.Position = Vector3.new(-24, 9.2, -874)
Clone.Parent = game.Workspace
Clone.Anchored = true
wait(2)
Clone.Anchored = false
end
end
end
end
end
end
end
end
script.Parent.Touched:connect(OnTouched)
What i'm trying to do is when you step on the button, it only takes 68000 out of your money and spawn the car at its coordinates.
Mistake:
- It doesn't spawn the copied car at its coordinates.
All help would be gladly appreciated. Thanks!

1 comment
What do you mean?