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

What's the problem? TweenService not working.

Asked by 3 years ago

Hello everyone! I am working a little with TweenServices. It occurred a error while it happening. Here's a little video to see if it can help.

Here's my code:

`local TweenService = game:GetService("TweenService") local part = script.Parent

local Info = TweenInfo.new(

1, 
Enum.EasingStyle.Bounce,
Enum.EasingDirection.Out,
1,
false,
1

)

local partGoals = {

Size = Vector3.new(512, 20, 512)
BrickColor = BrickColor.new("Black")

}

local TweenCreate = TweenService:Create(part, Info, partGoals)

TweenCreate:Play()`

Please help me with this. That would be really helpful!

1
What error did it give? Errors are useful, don't just ignore them. They can give a lot of information on why it didn't work. brokenVectors 525 — 3y
0
Use formatting User#30567 0 — 3y

2 answers

Log in to vote
2
Answered by
imKirda 4491 Moderation Voter Community Moderator
3 years ago

Did you put comma in goals ? You have this:

local partGoals = {
    Size = Vector3.new(512, 20, 512) -- no ,
    BrickColor = BrickColor.new("Black")
}

You see, there is no comma

Shouldn't it be:

local partGoals = {
    Size = Vector3.new(512, 20, 512), -- with coma
    BrickColor = BrickColor.new("Black")
}

I might be wrong tho, that could be a thing too

0
Strange. I tried it, but it still dosn't work. Ducksneedhelp 129 — 3y
0
Then go to the output and seek for errors, this is the best thing to do when something is not working. Also problem could be if you are using local script, it has to be in starter gui or starter player script or some other few locations to actually work, i don't think that it will work when it is inside of a part, but that is only in case it is local script. imKirda 4491 — 3y
Ad
Log in to vote
0
Answered by 3 years ago

I tried it and it does work.

0
this fits more as a comment than an answer brokenVectors 525 — 3y
0
are you referring to your comment or his answer User#30567 0 — 3y

Answer this question