I'm trying to make a npc that despawns this is my script
local NPC = script.Parent.Parent
wait(30)
NPC:Destroy()
I'm trying to make a npc that despawns this is my script
local NPC = script.Parent.Parent
wait(30)
NPC:Destroy()
This discussion is preserved as it was. New answers, comments, and votes are closed.
4 comments
What happens when you run the script?
When i run the script it stays in the game. But it's supposed to be removed
Make sure script.parent.parent isn't some random part and is the actual NPC.
Yep, if the script is in the NPC use script.Parent if the script is in another item then script.Parent.Parent