LeafDoode
|
  |
| Joined: 29 May 2017 |
| Total Posts: 3094 |
|
|
| 19 Oct 2017 01:04 PM |
so what i wanna do is make a script where...for example they kill someone with a gun lets say what is the if statement that checks who killed the player?
all i know is if humanoid:FindFirstChild("creator") then
since i don't really use creator tags
Thanks!
ROBLOX > Minecraft |
|
|
| Report Abuse |
|
|
LeafDoode
|
  |
| Joined: 29 May 2017 |
| Total Posts: 3094 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 19 Oct 2017 01:35 PM |
| the "creator tag" is (by convention) an ObjectValue and the Value of it is the Player that damaged that particular Humanoid. |
|
|
| Report Abuse |
|
|
LeafDoode
|
  |
| Joined: 29 May 2017 |
| Total Posts: 3094 |
|
|
| 19 Oct 2017 01:41 PM |
| #### thanks for the suggestion but i wanted an example since i never used creator tags ROBLOX > Minecraft |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 19 Oct 2017 01:42 PM |
How was I not clear enough.
"an ObjectValue" "the Value of it is the Player that damaged that particular Humanoid."
Humanoid.creator.Value... |
|
|
| Report Abuse |
|
|
LeafDoode
|
  |
| Joined: 29 May 2017 |
| Total Posts: 3094 |
|
|
| 19 Oct 2017 01:44 PM |
| example we have to human beings ### #### ### has a knife jake has nothing bob shoots jake how would i check who killed jake? i know its creator tags but how would i use it if the example u gave was the way i am stupid.. ROBLOX > Minecraft |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 19 Oct 2017 02:06 PM |
game:GetService("Players").PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) character:WaitForChild("Humanoid").Died:connect(function() for _, child in pairs(character.Humanoid:GetChildren()) do if child.Name == "creator" and child:IsA("ObjectValue") then print(child.Value.Name .. " killed (or helped kill) " .. player.Name) end end end) end) end)
|
|
|
| Report Abuse |
|
|
LeafDoode
|
  |
| Joined: 29 May 2017 |
| Total Posts: 3094 |
|
|
| 19 Oct 2017 02:17 PM |
I get it now!
but the thing is really confusing me with this is how would i use it with tools
ROBLOX > Minecraft |
|
|
| Report Abuse |
|
|
LeafDoode
|
  |
| Joined: 29 May 2017 |
| Total Posts: 3094 |
|
| |
|