I'm trying to code that when you run out of water in the GUI I made, the hose that sprays water will be named to something else so it can't spray any longer.
while true do
wait(1)
if script.Parent.Size.Y >= (UDim.new(0, 0)) then
game.Players.LocalPlayer.Character.Chest.hose.name = "broken"
end
end
Error: 17:07:40.871 - Players.Player1.PlayerGui.ScreenGui.water.Script:3: attempt to compare two userdata values

4 comments
Thank you 1waffle1, but now I get this error after doing that. 18:27:04.850 - Players.Player1.PlayerGui.ScreenGui.water.Script:3: attempt to compare userdata with number
I don't know what you did so I can't fix what you did wrong.
while true do wait(1) if script.Parent.AbsoluteSize.Y >= (UDim.new(0, 0)) then game.Players.LocalPlayer.Character.Chest.hose.Name = "broken" end end
I said UDim2 does not have relational operators. You can't do that. You're trying to compare a number to something that isn't a number.