Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make gui change position from a script ?

Asked by 6 years ago

I have this but I am pretty sure this is wrong. I think I need something like Udim2 or something along those lines but I dont know what it is .

if game:GetService("UserInputService").ModalEnabled == false then
    script.Parent.Position=(0.454, 0),(0.442, 75)
end

0
.Position=UDim2.new(xscale,xoffset,yscale,yoffset) is the correct format lukeb50 631 — 6y
0
Did you get my hint @lukeb50? hiimgoodpack 2009 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago
if game:GetService("UserInputService").ModalEnabled == false then
    script.Parent.Position = UDim2.new(0.454, 0, 0.442, 75)
end

UDim2 creates a new UDim2, using two pairs of UDim coordinates, used for Gui Objects.

Ad

Answer this question