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

This Script Won't Work and I get no error it just doesn't tween, help?

Script:

local s = script.Parent.Frame
local particles = s:GetChildren("Particle")
local pos = nil
for _,y in next,particles do
pos = y.Position
y.Position = UDim2.new(-1,0,0,0)
y:TweenPosition(UDim2.new(pos), 'Out', 'Bounce', 0.2, true)
end

Nothing happens. Well, after I change the position in "y.Position = UDim2.new(-1,0,0,0)" after that there's no tweening. Which is the main part. Tweening. Nothing tweens and I don't understand why. I've tried typing this script out several different ways and nothing happens. Everything works but the tweening bit. Help? No it's not a localscript. It's in StarterGui in a ScreenGui. No there is no error. Just blank nothingness.

3 comments

0

As I said I have made several version of this. Here is another with NO outcome. local s = script.Parent.Frame local particles = s:GetChildren("Particle") local pos = nil local tab = {} for __,y in pairs (particles) do table.insert(tab,y) end particles.Position = UDim2.new(-1,0,0,0) for _,z in next,(tab) do pos = z.Position z:TweenPosition(UDim2.new(pos), 'Out', 'Bounce', 0.2, true) end

0

Line 6: You didn't put parentheses around UDim2.new It should look like this: y.Position = (UDim2.new(-1,0,0,0))

0

local s = script.Parent.Frame local particles = s:GetChildren("Particle") local pos = nil local tab = {} for __,y in pairs (particles) do table.insert(tab,y) end particles.Position = (UDim2.new(-1,0,0,0)) for _,z in next,(tab) do pos = z.Position z:TweenPosition(UDim2.new(pos), 'Out', 'Bounce', 0.2, true) end Still doesn't work ;/

1 answer

TweenPosition doesn't yield. It isn't tweening because the position is being set right after.

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