I have this local script inside of a frame that is just supposed to change the size of the frame. But the size isn't updating to the value I want it to when I test it out. When I run the command:
game.Players.jediplocoon.PlayerGui.Level.XPBar.Size = UDim2.new(0, 200, 0, 30)
in the output/console it works just fine, but it doesn't work for some reason in my script, here it is:
local barsize = script.Parent.Size
while true do
barsize = UDim2.new(0, 200, 0, 30)
print(barsize) --prints {0, 200},{0, 30}
wait(1)
end
Note-This is in a local script in a frame, which I'm trying to change the size of. If anybody could tell me what I did wrong, and point me in the right direction that would be greatly appreciated.

3 comments
Instead of using game.Players.[Player], use game.Players.LocalPlayer. Also, please don't resize guis using pixels.
I'm pretty new to scripting in roblox, how would I resize it without using pixels?
nvm, i just looked it up