My script no work again :c

this script is about when you activate the tool the player eats food and farts, i want when farts it creates an object of poop but it doesn’t and the smoke doesn’t get off the player how do i solve this issue ? please reply i am really in-need of the support :c
script:

local tool = script.Parent
local sfx = tool.Handle:WaitForChild("SmokeSFX")
local brownie = game.ReplicatedStorage:WaitForChild("Brown")

print("done")

tool.Activated:Connect(function()
	--instead of declaring variables at the start, we use them here to simplify
	local cha =tool.Parent --the tool is in the character of the player, so Tool.Parent
	local lowertorso =cha:WaitForChild("LowerTorso")

	local smoke = Instance.new("Smoke")
	smoke.Parent = lowertorso
	smoke	.Color = Color3.new(0.666667, 0.333333, 0)
	sfx:Play()
	smoke.Name = "Black"
	smoke.Enabled = true
	brownie:Clone()
	brownie.Position = lowertorso.Positon
	wait(1)
	smoke.Enabled = false -- lets wait the smoke disables for a smooth effect
	game.Debris:AddItem(smoke, 2)

end)

I believe if you want to clone in object, you have to make a new variable for it. So it would really be something like:

local clone = brownie:Clone()
clone.Parent = workspace
clone.Position = lowertorso.Position
1 Like

and im here again to help you, again

1 Like

You are moving the original brownie position to character. Assuming this is in ServerStorage/ReplicatedStorage, you wouldn’t see it move in workspace and you need to keep the original object so it can be used more than once!

You need to define the cloned item as a variable and move the position of the cloned item.
Here is the modified section of that code:

local newBrownie = brownie:Clone()
newBrownie.Position = lowertorso.Positon

as @SentorAmery250 said

when cloning something you have to clone the instance with the same variable

is wrong, because:

  1. you are cloning an instance and stop. brownie and brownie:Clone() are 2 different things

and to fix this point you can brownieClone = brownie:Clone(), so you can modify the clone

  1. whe cloning, you arent setting a parent, and this means the clone wont be seen by the player

to fix this, set the parent to Workspace

brownieClone.Parent = workspace
  1. this is optional, but wait(1) is laggy and unoptimized, better if you use task.wait(1) that is basically 2x faster
2 Likes

thank y’all for the help they need to add double solutions so that i select you both