Hello once again, I made a tween that loops 50 times and makes a pellet above the player and all its supposed to do is move each pellet from where it was spawned to the mouse hit but the issue is that its doing this thing(see video)
Script(runs 50 times, wait(0.05)):
local WooshSound = workspace.Sounds.SFX.Woosh
local Pellet = Instance.new("Part", workspace.PlayerObjects)
Pellet.Name = player.Name.."'s Pellet"
Pellet.CanCollide = false
Pellet.Anchored = false
Pellet.Shape = "Ball"
Pellet.BrickColor = BrickColor.new("White")
Pellet.Size = Vector3.new(0.5, 0.5, 0.5)
Pellet.CFrame = RootPart.CFrame * CFrame.new(math.random(-6,6),math.random(4, 8),math.random(1,3))
Pellet.CFrame = CFrame.new(Pellet.Position, MouseHit)
local Distance = (Pellet.Position - MouseHit).Magnitude
local TimeSpeed = Distance / 50
local PelletLaunchTweenInfo = TweenInfo.new(TimeSpeed)
local PelletLaunchTween = TweenService:Create(
Pellet,
PelletLaunchTweenInfo,
{
Position = MouseHit
}
)
local WooshClone = WooshSound:Clone()
WooshClone.Parent = character
WooshClone:Play()
game.Debris:AddItem(WooshClone, 1)
PelletLaunchTween:Play()
game.Debris:AddItem(Pellet, 5)
is it just a visual bug or am i just doing to much at once?