I’m trying to tween the size of a particle emitter to create a nice VFX but i’m getting the error:
TweenService:Create property named 'Size' on object 'Power' is not a data type that can be tweened
I’m tweening a NumberSequence with keypoints inside and I asked the AI assistant if I could tween the size of a particle emitter or not and it said I could but the error messge says otherwise.
Code
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
local Remotes = ReplicatedStorage.Remotes
local Assets = ReplicatedStorage.Assets
local Projectiles = Assets.Projectiles.Blackhole
local Blackhole = {}
function Blackhole:Init()
Remotes.ToClient.OnClientEvent:Connect(function(signal,character,hitboxName)
if signal == "Blackhole" then
if character.Parent ~= workspace then return end
local poop = workspace:FindFirstChild(hitboxName)
local ap = Instance.new("AlignPosition")
ap.Mode = Enum.PositionAlignmentMode.OneAttachment
ap.Position = poop.Position
ap.MaxVelocity = 1e6
ap.MaxForce = 1e6
ap.Responsiveness = 100
ap.Attachment0 = character:FindFirstChild("HumanoidRootPart").RootAttachment
ap.Parent = character.HumanoidRootPart
task.spawn(function()
while true do
ap.Position = poop.Position
task.wait()
if poop.Parent ~= workspace then
ap:Destroy()
break
end
end
end)
elseif signal == "BlackholeFX" then
local particles = Projectiles.Particles:GetChildren()
local poop = workspace:FindFirstChild(character)
local attachment = poop:FindFirstChild("Attachment")
for i,v in particles do
local new = v:Clone()
new.Parent = attachment
end
attachment.Parent = poop
end
end)
Remotes.ToClient.OnClientEvent:Connect(function(signal,partName)
if signal == "Supernova" then
local part = workspace:FindFirstChild(partName)
local info = TweenInfo.new(0.5,Enum.EasingStyle.Exponential,Enum.EasingDirection.In)
local supernova = Projectiles.Supernova:Clone()
local particle = supernova.Attachment.Power
local c1 = RunService.Heartbeat:Connect(function()
supernova.Position = part.Position
end)
local c2
local blackhole
local size = NumberSequence.new({
NumberSequenceKeypoint.new(0,3.5),
NumberSequenceKeypoint.new(1,3.5),
})
TweenService:Create(particle,info,{Size = size}):Play()
local supernovaIn = TweenService:Create(supernova,info,{Size = supernova.Size/2})
supernovaIn:Play()
supernovaIn.Completed:Connect(function()
c1:Disconnect()
supernova:Destroy()
blackhole = Projectiles.Final:Clone()
blackhole.Size /= 2
blackhole.Parent = workspace
c2 = RunService.Heartbeat:Connect(function()
blackhole.Position = part.Position
end)
TweenService:Create(blackhole,info,{Size = blackhole.Size * 2}):Play()
task.wait(1.5)
blackhole:Destroy()
c2:Disconnect()
end)
end
end)
end
return Blackhole
In the bottom client event with the signal “Supernova” I am tweening a NumberSequence.