Okay, so I tried to make this Command Bar, where if inserted a specific thing, it will activate a BoolValue placed in lightning that will modify a TextLabel's Text.
Example: I write in this command bar "command_turnon". Bool value in lightning activates. TextLabel's text = "On".
I tried it in Studio with Test function and it worked but in the main game no. Why?
local plr = game.Players.LocalPlayer local bar = plr.PlayerGui.ControlPanel.Frame.CommandBar local stuffON = "command.stuffstatus(ON)" local stuffOFF = "command.stuffstatus(OFF)" script.Parent.MouseButton1Click:Connect(function() if bar.Text == stuffON then game.Lighting.BoolValue.Value = true end if bar.Text ==stuffOFF then game.Lighting.BoolValue.Value = false end end)
And the music that is played because of the value of the BoolValue
local playergui = game.Players.LocalPlayer.PlayerGui while wait(2.7) do if game.Lighting.BoolValue.Value == true then playergui.ControlPanel.Frame.Situation.Value.TextLabel.Text = "ON" playergui.Music:Play() playergui.Music.Looped = true end if game.Lighting.BoolValue.Value == false then playergui.ControlPanel.Frame.Situation.Value.TextLabel.Text = "OFF" playergui.Music:Stop() playergui.Music.Looped = false end end
HELP PLEASE!