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
function OnTouch(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent)then
Clone = game.Workspace["Nissan 240SX(Car)"]:Clone()
Clone.Parent = game.Workspace
Clone:MoveTo(Vector3.new(-26, 4.2, -878))
end
end
end
end
end
end
end
end
script.Parent.Touched:connect(OnTouch)
script.Parent.Touched:connect(OnTouched)
What is wrong with this script? I'm trying to have the players buy the car and then the car is suppose to spawn at its coo-ordinates.
Problems:
The car doesn't spawn at its coordinates.
It not only takes $68000 from the player, but from everyone else's money too.
Any Help? Please Answer!

2 comments
Thanks! :)
Found out the problem. You put "humanoid" and not "Humanoid". No big deal though. Thank you so much! :)