I made a script that would play audio when "E" is pressed and I get this error whenever I load the game.
'end' expected (to close 'while' at line 8) near '<eof>'
Any ideas how to fix this? Here is the script
local Fireing = false local IsEquipped = false local Clicking = false local MouseTarget = false Mouse.KeyUp:connect(function(key) if key == "e" then while IsEquipped == true do if IsEquipped == true and Clicking==true then game.Workspace.Sound:Play(821439273) end
local Fireing = false local IsEquipped = false local Clicking = false local MouseTarget = false Mouse.KeyUp:connect(function(key) if key == "e" then while IsEquipped == true do if IsEquipped == true and Clicking==true then game.Workspace.Sound:Play(821439273) end end
You forgot to put the "end" of your while loop.