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

How do I tween this properly?

I'm coding my GUI so it can tween to a position, but it isn't working currently. (the place it want it tweened to is here {0.006, 0},{0.869, 0})

Can I get some help? Here's my code

local frame = script.Parent.Parent.Parent:WaitForChild('healthgui').Frame
local healthguispawn = false -- telling code to spawn in health gui
wait(0)
local healthguispawn = true -- spawning it in
if healthguispawn = true then
wait(0.1)
frame:TweenPosition(UDim2.new(-1, 0,0.869, 0, 'Out', 'Bounce', 1))

end)

--{0.006, 0},{0.869, 0} old position lol

If this is any help, here's my setup on my workplace https://i.imgur.com/f8RVqXG.png

1 comment

0

You put Out, Bounce, 1 in the UDim2 function. XP

1 answer

✓ Accepted answer

You wrote the GUI Tween wrong. Use this.

local frame = script.Parent.Parent.Parent:WaitForChild('healthgui').Frame
local healthguispawn = false

wait(0)
local healthguispawn = true
if healthguispawn = true then
    wait(0.1)
    frame:TweenPosition(UDim2.new(-1, 0, 0.869, 0), 'Out', 'Bounce', 1)
end

2 comments

0

hey u copied me (jk)

0

Huhahahahahaha

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