You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to achieve that a script will destroy its model and itself after 5 secs
What is the issue? Include screenshots / videos if possible!
well turns out the issue is that after 5 secs of waiting, it hasn’t disappeared
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I think that’s the only solution I have so far since this code is very short and easily understandable by a non experienced scripter
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
wait(5)
script.Parent.kenk:Destroy() -- This should disappear
script:Destroy() -- And this should also disappear
print("success!") -- this should be the output when I run the code for 5 secs
--RESULT: Nothing.. The script is still there with the model "kenk"
Make sure the Script isn’t disabled, and in the output, look for success without a colored bar to its left. To demonstrate, I did this with a LocalScript, destroying the character.
You can see “success!” with no color highlight, so do make sure it prints something.
I believe the script being destroyed is intended, also, destroying the model and then the Parent works completely fine as seen by my example in reply 1.
Well, I’m extremely confused on why you are doing this in the first place? You can skip the script and just remove all junk, or “kenk” from ServerStorage.
Scripts only work in about 7 places:
Workspace,
ReplicatedFirst,
ServerScriptService,
StarterGui,
StarterPack,
StarterCharacterScripts,
and finally,
StarterPlayerScripts.
There may be more, like SoundService, but I haven’t tried before.