Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a script stop running with another script?

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.