I am trying to make a script where a part, which has a value in it, goes into a tunnel gets deleted and another part spawns, it doesn't seem to work, and I can't tell why it won't. Can anyone tell me what I am doing wrong?
function mold() local part = script.Parent.Candy:Clone() part.Parent = game.Workspace part.Anchored = false part.Transparency = 0 end function Delete(cat) if cat:FindFirstChild("Value") then cat:Destroy() mold() end end script.Parent.Molder.Touched:connect(Delete()) ``