Help me, i cant make this script with enabling and disabling

I can’t make script that can enable and disable smoke in my game with gui.

Please help me, im really new in scripting

This is my script:

script.Parent.MouseButton1Click:Connect(function()
game.Workspace.Ship.SmokeFunnel.Smoke = true else
	game.Workspace.Ship.SmokeFunnel.Smoke = false
end)

this should toggle it

script.Parent.MouseButton1Click:Connect(function()
	local smoke = game.Workspace.Ship.SmokeFunnel.Smoke
	smoke.Enabled = not smoke.Enabled
end)
1 Like

Thank you for help, it works now.

2 Likes

could you please mark my post as the solution so people know this thread is solved?

I don’t think he marked it as resolved :slightly_frowning_face:

:frowning: i am sad now. i love having high solution counts

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.