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

MouseButton1Click function help?

How do I make it add smoke to the player 1 TIME ONLY when they click?

--//Variables
local player = game.Players.LocalPlayer

--//Function
script.Parent.MouseButton1Click:connect(function()
	local sm = Instance.new("Smoke")
	sm.Parent = player.Character.Torso

end)

1 answer

✓ Accepted answer

Just check if there is already smoke in their torso. Add

if not player.Character.Torso:FindFirstChild('Smoke') then

before line 5 and add 'end' after line 7, but before the 'end)'

This discussion is preserved as it was. New answers, comments, and votes are closed.