Here's the script
script.Parent.MouseButton1Click:connect( function()
if not script.Parent.Text == "On" then
script.Parent.Text = "On"
elseif not script.Parent.Text == "Off" then
script.Parent.Text = "Off"
end
end)
help please
Here's the script
script.Parent.MouseButton1Click:connect( function()
if not script.Parent.Text == "On" then
script.Parent.Text = "On"
elseif not script.Parent.Text == "Off" then
script.Parent.Text = "Off"
end
end)
help please
see if that works
script.Parent.Text = "Off"
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Text == "On" then
script.Parent.Text = "Off"
elseif script.Parent.Text == "Off" then
script.Parent.Text = "On"
end
end)
Just change the variable for it. Normally people don't write not infront of the if statement but instead by the equal sign..
script.Parent.Parent.TextButton.MouseButton1Click:Connect(function()
if script.Parent.Text ~= "On" then
script.Parent.Text = "On"
elseif not script.Parent.Text ~= "Off" then
script.Parent.Text = "Off"
end
end)
You don't need to change anything on this script just copy and paste it
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
Also you spaced you function......
Just gotta add that because it might cause some problems in your script
also "connect' is deprecated
Spaced function won't cause any problems