Why is there an error code and why doesn't this part move?

314 ![315|690x87]

local click = script.Parent.ClickDetector

local folder = script.Parent.Parent.Parent.Bulletsfolder

local bulletS = script.Parent.Parent.Parent.Deagle.bulletspawn

local bulletfolder = game.ReplicatedStorage.bullets

click.MouseClick:Connect(function()
	
	local bullet = bulletfolder.Bullet
	bullet:Clone()
	bullet.Position = bulletS.Position
	bullet.Size = bulletS.Size
	bullet.BrickColor = BrickColor.new("Bright yellow")
	bullet.Value.Value = 1
	bullet.Parent = folder
	bullet.Transparency = 0
	
end)

part (bullet) script :

local part = script.Parent

if part.Transparency == 0 then
	while true do
		part.Position = part.Position + Vector3.new(0, 0, -0.100)
	end
else
	if part.Transparency == 1 then
		return
	end
end
1 Like

You’re making a clone, but you never do anything with the actual clone. It’s doing things with the original instead of the clone.

To fix this, change

local bullet = bulletfolder.Bullet
	bullet:Clone()

to

local bullet = bulletfolder.Bullet:Clone()
1 Like

so it did get rid of the error but why wont the bullet it’s self move when it was cloned?

nvm i found the problem and fix it