Command to spawn part (kohls admin) doesn't work if theres a trail

Theres a command called :pb, its to spawn a ball. It works but if theres a ball trail it dosen’t. How can I fix that?

	{{'publicball','pb'},{'Spawns a public ball infront of a player'},0,{'player'},function(pl,args)
		if workspace.Configuration.SpawnPublicBall.Value == true then
			for _, player in pairs(args[1]) do
				for i, v in pairs(workspace:GetDescendants()) do
					if v:FindFirstChild("PB") then
						if v.PB.Value == player.Name then
							v:Destroy()
						end
					end
				end
				local ball = game.Lighting.TPS:Clone()
				local offset = Vector3.new(0,-1.6,-5)
				ball.PB.Value = player.Name
				ball.CFrame = player.Character.Torso.CFrame * CFrame.new(offset)
				ball.Parent = game.Workspace.Balls
			end
		end
	end},

Your Trying to make a CFrame.new on A Vector3 that its a position not a CFrame

1 Like

Also i Forgot Heres the Solution

{{'publicball','pb'},{'Spawns a public ball infront of a player'},0,{'player'},function(pl,args)
		if workspace.Configuration.SpawnPublicBall.Value == true then
			for _, player in pairs(args[1]) do
				for i, v in pairs(workspace:GetDescendants()) do
					if v:FindFirstChild("PB") then
						if v.PB.Value == player.Name then
							v:Destroy()
						end
					end
				end
				local ball = game.Lighting.TPS:Clone()
				ball.PB.Value = player.Name
				ball.CFrame = player.Character.Torso.CFrame * CFrame.new(0,-1.6,-5)
				ball.Parent = game.Workspace.Balls
			end
		end
	end},

I just set the offset values to the cframe.new arg then now it should work