I’m making an pop up gui and the math.random is getting the same value each time. Heres my script
script.Parent.Changed:Connect(function(Value)
local Text = script.Parent.Parent
local Frame = script.Parent.Parent.Parent
Frame.Position = UDim2.new(0.357, 0, 0.613, 0)
Text.TextTransparency = 0
Frame.Visible = true
local RandomPosY = math.random(0.313, 0.563)
local RandomPosX = math.random(0.257, 0.757)
Frame.Position = UDim2.new(RandomPosX, 0, RandomPosY, 0)
script.Parent.Parent.Text = "+"..Value
Frame:TweenPosition(
UDim2.new(Frame.Position.X, Frame.Position.Y + UDim.new(-0.2, 0)),
"Out",
"Linear",
0.4
)
wait(0.3)
for i = 0, 1, 0.1 do
wait(0.01)
Text.TextTransparency = i
end
Frame.Visible = false
end)
So the frame is basically popping up in the left top corner each time