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

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

Asked by
lysandr 49
7 years ago
Edited 7 years ago

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.

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 lysandr 49 — 7y
0
Line 6: You didn't put parentheses around UDim2.new It should look like this: y.Position = (UDim2.new(-1,0,0,0)) xEiffel 280 — 7y
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 ;/ lysandr 49 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

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

Ad

Answer this question