Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to make gui change position from a script ?

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

3 comments

0

.Position=UDim2.new(xscale,xoffset,yscale,yoffset) is the correct format

0

Did you get my hint @lukeb50?

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.