I want a tween size script to change the size of an object but it doesn't change the size. Any sort of help will be appreciates.
local TweenService = game:GetService("TweenService")
local function Tween1 (Object, tweenProps, tweenTime)
local TI = TweenInfo.new(tweenTime, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 5, true, 0)
TweenPlay1 = TweenService:Create(Object, TI, tweenProps)
TweenPlay1:Play()
end
local function Tween2 (Object, tweenProps, tweenTime)
local TI = TweenInfo.new(tweenTime, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 5, true, 0)
TweenPlay2 = TweenService:Create(Object, TI, tweenProps)
TweenPlay2:Play()
end
local function Tween3 (Object, tweenProps, tweenTime)
local TI = TweenInfo.new(tweenTime, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 5, false, 0)
TweenPlay3 = TweenService:Create(Object, TI, tweenProps)
TweenPlay3:Play()
end
local function Tween4 (Object, tweenProps, tweenTime)
local TI = TweenInfo.new(tweenTime, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 5, false, 0)
TweenPlay4 = TweenService:Create(Object, TI, tweenProps)
TweenPlay4:Play()
end
script.Parent.MouseButton1Down:Connect(function()
script.Parent.Parent.Visible = false
game.StarterGui.ScreenGui.This.Visible = false
game.Lighting.ClockTime = 1
game.StarterPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
workspace.baseplate.Transparency = 1
workspace.SunAtmos.Transparency = 0
workspace.SunBody.Transparency = 0
Tween1(game.Lighting, {ExposureCompensation = 3}, 2)
Tween2(workspace.SunAtmos and workspace.SunBody, {Color3.fromRGB(47, 3, 124) and Color3.fromHSV(262, 248, 124)}, 2)
wait(10.5)
TweenPlay1:Cancel()
TweenPlay2:Cancel()
--This is where the script doesn't run
Tween3(workspace.SunBody, {Size = workspace.SunBody2.Size}, 2)
Tween4(workspace.SunAtmos, {Size = workspace.SunBody2.Size}, 2)
wait (3)
TweenPlay3:Cancel()
TweenPlay4:Cancel()
workspace.SunAtmos.Transparency = 1
end)
