Script:
while true do PBL = workspace.Sound.PlaybackLoudness if PBL + 100 then game.Workspace.BlueAndRed.BrickColor = BrickColor,Blue() if PBL + 600 then game.Workspace.BlueAndRed.BrickColor = BrickColor.Red()
end
For some reason it says:
Workspace.BlueAndRed.Script:7: 'end' expected (to close 'if' at line 3) near '< e o f >'
this is what you are trying to do
while true do wait(0.1) -- make sure to add wait() to while true do or it will crash local PBL = workspace.Sound.PlaybackLoudness -- add local if PBL == 100 then -- you have to have == you can do if PBL + 100 == 101 then game.Workspace.BlueAndRed.BrickColor = BrickColor,Blue() end -- make sure you close if statement with end if PBL == 600 then game.Workspace.BlueAndRed.BrickColor = BrickColor.Red() end end
First of all, please marked as answered for this answer if it helped. If you are not the asker and this still helps and u have a similar question, upvote always works!
-- Debugged by VVickedDev --Created by jamielelystad while true do wait(0.1) PBL = workspace.Sound.PlaybackLoudness if PBL + 99 >=100 then game.Workspace.BlueAndRed.BrickColor = BrickColor.Blue() end if PBL + 599 >= 600 then game.Workspace.BlueAndRed.BrickColor = BrickColor.Red() end end
Hope this script helped you better understand your errors in Roblox Lua! I hope you get successful some day with your game!