Hello, Basically i’m tryna make a gui That almost every single simulator game has, You do something and a gui about it pops up, as example “+1 Strength” and yk it goes up then disappears. so basically thats what im tryna do but theres some error that i literally can not understand
local NewGui = StrengthFrame:Clone()
NewGui.Parent = playerGui.StatGains (its a screengui)
NewGui.Position = UDim2.new({math.random(0.1,0.950),0},{math.random(0.150,0.800),0})
i’m copying a gui which was in replicated storage, parenting it to a screen gui then im trying to change the position of the frame but for some reason it does not change the position of the frame
i don’t have much experience about gui’s, ill appreciate it alot if one of u guys find the solution
replace this UDim2.new({math.random(0.1,0.950),0},{math.random(0.150,0.800),0})
with this UDim2.new(math.random(0.1,0.950),0,math.random(0.150,0.800),0)
it is annoying but when you copy it you need to remove the { } { } that roblox puts in the text
i have responded with the error fix
i assume that’s what you are looking for
its 1 post above but here is the link anyways Gui does not change position | Post
i found out the problem you cant math.random under 1
example
math.random(0.5,0.8)
(it always comes out as 0) Sorry that it took time to reply i just thought i replied yesterday
if you want better results you can add a 0 to all of the numbers i changed
like NewGui.Position = UDim2.new(math.random(100,950)/1000,0,math.random(150,800)/1000,0)