This script charges up an orb, after a remote is fired, the orb is supposed to grow in front of your head, the problem is that the orb wont grow. I have tried tweening and lerping.
[Edit] Now that I fixed that error, another one has appeared, Now the part falls through the baseplate whenever It spawns. I tried welding and anchoring. In other words, I’m trying to figure out how to make the orb stay put in front of my face.
game.ReplicatedStorage.Moves.OnServerEvent:Connect(function(plr,key,mousehit)
if key == "Blast" then
local char = plr.Character
local hum = char.HumanoidRootPart
local charging = Instance.new("Part")
charging.Name = "Blast"
charging.Transparency = 0.5
charging.Material = Enum.Material.Neon
charging.Shape = Enum.PartType.Ball
charging.Size = Vector3.new(0.1,0.1,0.1)
charging.CanCollide = false
charging.BrickColor = BrickColor.new("Really red")
charging.Parent = workspace
local head = char.Head
local weld = Instance.new("Weld")
charging.CFrame = char.Head.CFrame * CFrame.new(0,0,-2)
weld.Part0 = head
weld.Part1 = charging
weld.C0 = head.CFrame:Inverse()
weld.C1 = charging.CFrame:Inverse()
weld.Parent = charging
local function charge()
local chargingPart = charging:Clone()
chargingPart.Parent = charging
chargingPart.CanCollide = false
chargingPart.Transparency = 0.5
chargingPart.Shape = Enum.PartType.Ball
chargingPart.Material = Enum.Material.Neon
chargingPart.BrickColor = BrickColor.new("Really red")
chargingPart.Size = Vector3.new(0.1,0.1,0.1)
chargingPart.CFrame = charging.CFrame * CFrame.new(math.random(-0.6,0.6),math.random(-0.6,0.6),math.random(-0.6,0.6))
chargingPart.Anchored = true
charging.Size = Vector3.new(charging.Size.X + 0.01,charging.Size.Y + 0.01, charging.Size.Z + 0.01) --Issue: The orb wont expand using lerp or tweening, if someone could explain why I would also appreciate it
game.Debris:AddItem(chargingPart,0.01)
end
for i = 0,1,0.01 do
spawn(charge)
wait(0.01)
end
wait()
charging:Destroy()
end
end)

2 comments
Why are you cloning "charging" and changing its properties again? They're already set, that's irrelevant.
You have a point, but will this solve my issue?