Hi guys for some reason I keep getting an error message saying:
20:49:33.123 - Players.Player1.Backpack.Tool.LocalScript:21: '=' expected near 'end'
Does anyone know how to fix this. Thanks CrystalCoder.
function GodPowers() if game.Players.LocalPlayer:GetMouse().X<(playerMouse.ViewSizeX/12) then Game.Lighting.TimeOfDay = "06:00:00" elseif game.Players.LocalPlayer:GetMouse().X<(playerMouse.ViewSizeX/12)+(playerMouse.ViewSizeX/12) then Game.Lighting.TimeOfDay = "07:00:00" elseif game.Players.LocalPlayer:GetMouse().X<(playerMouse.ViewSizeX/12)+(playerMouse.ViewSizeX/12)+(playerMouse.ViewSizeX/12) then Game.Lighting.TimeOfDay = "08:00:00" elseif game.Players.LocalPlayer:GetMouse().X<(playerMouse.ViewSizeX/12)+(playerMouse.ViewSizeX/12)+(playerMouse.ViewSizeX/12)+(playerMouse.ViewSizeX/12) then Game.Lighting.TimeOfDay = "09:00:00" end end script.Parent.Equipped:connect(function(eventMouse) while true do wait(0.1) GodPowers end end)
In the final lines, GodPowers
isn't a full statement (Lua is suggesting you fix it by turning it into GodPowers = something
).
You need to call the function, by appending parenthesis, rather than just name it:
GodPowers()