I’ve been trying to look for ways to fix the issue but I couldn’t find anything that on the devforum to help me out.
My goal was to create a TV that flashes different colors every 5 seconds
This is the line of code that keeps getting the error:
local tween1 = TweenService:Create(Tv,tweeningInformation,screen1)
This is the error:
This is the model my script is in
And, this is the whole script:
-- Created by GalacticQuasar, July 18, 2020 ("TV Screen Flashing Different Colors")
-- Variables
local TweenService = game:GetService("TweenService")
local Tv = script.Parent:WaitForChild("Screen")
-- Main:
local tweeningInformation = TweenInfo.new(
0.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
-- All Colors Goals & Tweens
local screen1 = {Color3.new(17, 17, 17)}
local screen2 = {Color3.new(112,0,1)}
local screen3 = {Color3.new(0, 22, 66)}
local screen4 = {Color3.new(36, 34, 80)}
local tween1 = TweenService:Create(Tv,tweeningInformation,screen1)
local tween2 = TweenService:Create(Tv,tweeningInformation,screen2)
local tween3 = TweenService:Create(Tv,tweeningInformation,screen3)
local tween4 = TweenService:Create(Tv,tweeningInformation,screen4)
-- Tweening Scripts
Loop = true
while Loop == true do
tween1:Play()
wait(5)
tween2:Play()
wait(5)
tween3:Play()
wait(5)
tween4:Play()
wait(5)
end
Thank you to everyone who can help me out with this! I appreciate it!