i need some help with this error i am new to scripting
local spinnerAlighned = isSpinnerAlighned(yellowSpinner) if spinnerAlighned == true then --Meter full yellowMeter.Meter.Size = UDim2.new(0, 283, 0, 73) else --Meter mostly empty local randomWidth = random:NextInteger(15, 40) yellowMeter.Meter.Size = UDim2.new(0, randomWidth, 0, 73) end end RunService.Heartbeat:Connect(update) function updateSpinner(spinner, delta) --The speed of the spinner in degrees/Spinner local spinnerSpeed = spinner.SpinSpeed.Value --Rotate the spinner if spinner.ShouldSpin.Value == true then spinner.Rotation += spinnerSpeed * delta end end function updateMeter --this is the error line function isSpinnerAlighned (spinner) --The rotation of the spinners between 0-360 local realRotation = spinner.Rotation % 360 if realRotation < 10 or realRotation > 350 then return true else return false end end
function spinnerAlighned(yellowSpinner) -- you incorrectly declared a function here if spinnerAlighned == true then --Meter full yellowMeter.Meter.Size = UDim2.new(0, 283, 0, 73) else --Meter mostly empty local randomWidth = random:NextInteger(15, 40) yellowMeter.Meter.Size = UDim2.new(0, randomWidth, 0, 73) end end RunService.Heartbeat:Connect(update) function updateSpinner(spinner, delta) --The speed of the spinner in degrees/Spinner local spinnerSpeed = spinner.SpinSpeed.Value --Rotate the spinner if spinner.ShouldSpin.Value == true then spinner.Rotation += spinnerSpeed * delta end end function updateMeter() -- you left a line there you never declared the function correctly end --this is the error line function isSpinnerAlighned(spinner) --The rotation of the spinners between 0-360 local realRotation = spinner.Rotation % 360 if realRotation < 10 or realRotation > 350 then return true else return false end end
im not entirely sure what you are trying to do here because there are a ton of missing variables but i cleaned up the syntax for you