| |
|
| |
|
|
| 21 Aug 2016 05:48 PM |
how do i make it give an item
|
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 05:55 PM |
math.randomseed(tick())
local random = math.random(1,--insert chance, so for instance 1/3 would be 33% chance)
local humanoid = script.Parent:FindFirstChild("Humanoid") - Assuming the script is inside the enemy and the enemy has a humanoid
local item = game:GetService("ReplicatedStorage"):FindFirstChild("--item name")
humanoid.Changed:connect(function() if humanoid.Health == 0 and random == 1 then item:Clone item.Parent = game.Workspace item.Position = script.Parent.Position end end)
really inefficient method of doing it but it would go something like that
+1 |
|
|
| Report Abuse |
|
|
|
| 21 Aug 2016 06:25 PM |
it didnt work i put down a gear's name but nothing happened when i killed it
|
|
|
| Report Abuse |
|
|