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

Why will this part not tween?

Asked by
Plieax 66
6 years ago

I want the color of the block to tween to orange but it wont work..

local this = script.Parent
local tweenService = game:GetService("TweenService")

local tweenInformation = TweenInfo.new(

2,
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
10,
false,
2

)

local partProperties = {

    Color = Color3.new(255, 176, 0) 

}

local tween = tweenService:Create(this,TweenInfo,partProperties)

wait "10"
tween:Play()
0
why is there a string for wait? use wait(10) hellmatic 1523 — 6y
0
soz me not know CjayPlyz 643 — 6y
0
I have the wait so it waits 10 seconds before tweening Plieax 66 — 6y
0
@sickings Plieax 66 — 6y
0
change wait "10" to wait(10) Faazo 84 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

I try to avoid tweening as much as I can but there are sometimes where it's more relevant, example: GUIs, Changing the size of the part (AKA, these are easier to tween without looping)

In your case, switching the brick color is easy and can be done without tweening.

wait(10) --It seems like you want to wait 10...
script.Parent.BrickColor = BrickColor3.new("Bright orange")

Accept answer if it helped to mark this answered. If you need tutorials on tweening, see around the roblox wiki. Judging by your 'wait "10"' line, I feel safe to assume you are a beginner. So yeah, hope this did help.

0
Accepting answer gives us both +rep, marks this answered, and I don't like leeches. Also comment down below if you have any issues (highly unlikely). DaWarTekWizard 169 — 6y
0
Please don't ask people to accept your answer. People may think that you don't want to help but only gain +rep, especially after seeing you trying to convince them by listing the "benefits". Amiaa16 3227 — 6y
Ad

Answer this question