So for right now, i am trying to make it so when the skeleton dies if the number that was chosen is greater then 10 then he drops a skull. It seems to work only sometimes any suggestions?
It may be because math.random is giving the same number each time, is there a way to solve this?
I mean the main problem is now solved. Or both of the problems are. I just didn’t use the right event. The only problem with the solution is that when you put the math.random into the while true do, it sometimes will print 2 numbers because its constantly changing.
and also the items dont get cloned to the humanoid when the humanoid dies. The only item that dose get teleported is the “GoldSkull” When the value is = to 2
You don’t really need the while true do loop at the top nor do you need that wait(3) below it (also for future reference, task.wait is more precise than wait)
If there’s a lot of skeletons in your game, you could use Debris (game:GetService("Debris")) to destroy a lot of skeletons efficiently.
Debris:AddItem(item, delay)
There’s probably more I could add but that should be pretty good