01 | local Humanoid = script.Parent.Enemy |
02 | function PwntX_X() |
03 | local tag = Humanoid:findFirstChild( "creator" ) |
04 | if tag ~ = nil then |
05 | if tag.Value ~ = nil then |
06 | local Leaderstats = tag.Value:findFirstChild( "leaderstats" ) |
07 | if Leaderstats ~ = nil then |
08 | Leaderstats.Kills.Value = Leaderstats.Kills.Value + 1 |
09 | wait( 10 ) |
10 | script:remove() |
11 | end |
12 | end |
13 | end |
14 | end |
15 | Humanoid.Died:connect(PwntX_X) |
On line 3 and 6 you've done it as 'findFirstChild'. You're supposed to do it as FindFirstChild.
1 | local tag = Humanoid:FindFirstChild( "creator" ) -- line 3 issue |
2 |
3 | local Leaderstats = tag.Value:FindFirstChild( "leaderstats" ) -- line 6 issue |