I have a frame in a SurfaceGui (on a Part) and it isn’t changing size.
I need help with this.
I’ve tried changing the variables, but to no avail…
Script
local meter = script.Parent --Parent is named Blue in the Explorer
local timer = meter.Size.X.Scale
local timer2 = timer
wait(1)
for timer2 = 1, 10 do
timer = timer2/10
wait(.1)
end
Filepath
In workspace
It is a serverscript, not a local script.
Well I can’t try to help you with the script that much because I’m not home right now and my phone is about to run out of battery. For right now I would look on a tutorial for a SurfaceGui button right now, sorry.
local meter = script.Parent;
for i = 1, 10 do
meter.Size.X.Scale = i / 10;
wait(0.1);
end
I don’t know what do you mean by your previous code, but I think that the edited version is what you wanted.
Other than that, it should work, give it a try.
Also, you don’t need localscripts in order for surfacegui to work .
You can use serverscript (if placed under workspace) if you want every player to see the changes. However it doesn’t apply for screenguis
local meter = script.Parent;
for i = 1, 10 do
local size = meter.Size;
meter.Size = UDim2.new(i / 10,size.X.Offset,size.Y.Scale,size.Y.Offset);
wait(0.1);
end