TO BE MORE PRECISE:I believe the problem is at line 5, where it clones it prematurely from the ServerStorage rather than moving the chick to the egg. I have an egg script that will hatch an NPC when something gets near it, however the first time it spawns where the NPC's location is at (in ServerStorage) and after the script has re-enabled itself, the script works like how I intended it. Detail: I touch the egg, it plays the audio and spawns the NPC far away. When I go back and try it again, the NPC spawns on the egg (like I intended). Code:
function touch(hit)
local chick = game.ServerStorage:WaitForChild('chick')
local open = script.Parent.Open --the sound
local rootPart = script.Parent --the egg
local chickBaby = chick:Clone() --maybe why it spawns away from the egg?
wait(2)
open:Play()
wait(3)
script.Disabled = true
chickBaby:Clone()
chickBaby.Parent = workspace
chick:SetPrimaryPartCFrame(rootPart.CFrame)
wait(20)
script.Disabled = false
end
script.Parent.Touched:connect(touch)

2 comments
EDIT: you also cant disable a script from itself, I suggest you just use :wait() instead
The egg is anchored and the script does not fire when I enter the game. I made sure the egg is floating slightly so this would not happen, and the "script.Disabled" is a debounce. However, the code is useful so thank you!