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

How do I tween this properly?

Asked by 6 years ago
Edited 6 years ago

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

0
You put `Out, Bounce, 1` in the `UDim2` function. XP TheeDeathCaster 2368 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

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
0
hey u copied me (jk) TheeDeathCaster 2368 — 6y
0
Huhahahahahaha MachoPiggies 526 — 6y
Ad

Answer this question