[Edited with my code]
Hello,
I want to make a button that will disable/enable a trail in the workspace through StarterGUI.
I have the button already made, and here is the code I have:
local trail = workspace.RainbowTrail.Trail
function OnButtonClick()
if trail.Enabled == false then
trail.Enabled = true
end
if trail.Enabled == true then
trail.Enabled = false
end
end
The trail is a child of a script (I got the trail from the toolbox), and is in the workspace.
Any help is welcome!
Thanks in advance, MexheCo

1 comment
See answer below