When i put the new object it remains like a ghost and then disspears or just dissapears…
I don’t know what i should do about this… is it maybe the order of the lines? like, i got thge last object then got the clone of the new object and put it in the same part then killed the current obj and let the new one stay and changed it position. i don’t see any problem in the code…
CategoryItem = game.ServerStorage.Items[CategoryName][itemName]:Clone()
local lastObj = workspace[player.Name.."-ball"].Confetti
CategoryItem.Parent = workspace[player.Name.."-ball"]
CategoryItem.Name = "Confetti"
CategoryItem.CanTouch = false
CategoryItem.CanCollide = false
CategoryItem.Transparency = 1
while lastObj:GetAttribute("InUse") do
wait(0.01)
end
lastObj:Destroy()
CategoryItem.Position = CategoryItem.Parent.Position