How do I make a script stop running with another script?
✓ ANSWER ACCEPTED
How do I make a script stop running with another script?
1 answer
✓ Accepted answer
when you step on a brick to buy:
bought = false
script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
if game.Players:GetPlayerFromCharacter(hit.Parent).leaderstats.gold.Value >= 100 and bought == false then
bought = true
game.Players:GetPlayerFromCharacter(hit.Parent).leaderstats.gold.Value = game.Players:GetPlayerFromCharacter(hit.Parent).leaderstats.gold.Value-100
workspace.Wall:Remove()
end
end
end)
`
This discussion is preserved as it was. New answers, comments, and votes are closed.
