I am making a horizontal tower of hell like bar but when I test it an error pops up saying "attempt to call a nil value". This is the code where the error occurs:
function Update() for index, Player in next, PlayerLengthData do local xPosition = Player:GetLengthFromEnd() Player.Frame.Position = UDim2.new(xPosition, 0, 0.5, 0) end end
The error is on line 4. I don't know how to fix this error so please help.
Player:GetLengthFromEnd()
might not be a valid function, make sure that
As the error says, you are attempting to call a nil value, which would be GetLengthFromEnd
.