not normal script server script?
like the one called “Script” is a server script
i added a creator_tag which is a child of humanoid
um, did u add the script i sent
yes error string expected , got nil
on what line does that error come
the 6th line ---------------------
I changed line 2 of the code you gave and now its giving the name of who killed it !!!
now i only need the script that gives the player cash
where is the cash value located
inside player in a list called data
can u join the game and show screenshot
screenshot of what? the output?
where its located when u join the game
right beside where you spawn in the game
i mean like in the explorer show a screenshot of where it is inside the player
ok so ill tell u what i want to see, press play go in explorer go in players, open ur dropdown then open the data list
ah i see the problem try this:
local Players = game:GetService("Players");
script.Parent.Humanoid.Died:Connect(function()
local playerWhoKilled = NPC:GetAttribute("LastHitBy");
print(playerWhoKilled)
Players[playerWhoKilled].data.Cash.Value += math.random(70,120)
end)
the issue was that before u told u did Data.Cash but the screenshot shows data.Cash ( capital issue )