Anyone having issues scaling SpecialMeshes?
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenServicePlus = require(ReplicatedStorage:WaitForChild("Modules").TweenServicePlus)
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local TornadoMesh = script.Parent.Mesh;
local TornadoMeshes = TornadoMesh.Parent.Parent;
local Tornado = TornadoMeshes.Parent;
local TornadoStats = Tornado:WaitForChild("TornadoStats")
local TopSize = TornadoStats:WaitForChild("TopSize")
warn(TopSize.Value)
local tween = TweenServicePlus:Construct(
TornadoMesh,
tweenInfo,
{
Scale = Vector3.new(TopSize.Value, TopSize.Value, TopSize.Value)
},
.4,
true)
tween:Play()
-- This is a script in the part with the mesh.
It tweens it instantly which is not normal behavior.
In order to substitute this, I have to create a Script with RunContext set to Client put it in the part with the mesh inside of it and write this code:
local TweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local TornadoMesh = script.Parent;
local TornadoMeshes = TornadoMesh.Parent;
local Tornado = TornadoMeshes.Parent;
local TornadoStats = Tornado:WaitForChild("TornadoStats")
local TopSize = TornadoStats:WaitForChild("TopSize")
local tween = TweenService:Create(TornadoMesh.Mesh, tweenInfo, {Scale = Vector3.new(TopSize.Value, TopSize.Value, TopSize.Value)})
tween:Play()
I also have another script in the part which destroys it after a period of time and before it destroys it, it plays a tween in which it fades out and destroys the part this piece of code works perfectly fine yet somehow, I cannot change the properties of SpecialMeshes on the other piece of code.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenServicePlus = require(ReplicatedStorage:WaitForChild("Modules").TweenServicePlus)
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut)
local TornadoMesh = script.Parent;
local Lifetime = 5
task.wait(Lifetime)
local tween = TweenServicePlus:Construct(
TornadoMesh,
tweenInfo,
{
Transparency = 1
},
.4,
false)
tween:Play()
tween.Completed:Once(function()
TornadoMesh:Destroy()
end)
EDIT: Even tried changing the time threshold property to “0” it did nothing at all.