CAN YOU BE THE CHOSEN ONE TO SOLVE THIS MYSTERY...?
this script is inside a character model's humanoid and it detects if the humanoid finds a creator whenever the humanoids health goes to 0.
In line 7, it prints nil instead of printing playerName even though I can clearly see my name inside the Player service
01 | script.Parent.Changed:Connect( function () |
03 | if script.Parent.Health = = 0 then |
04 | if script.Parent:FindFirstChild( "creator" ) then |
05 | local creator = script.Parent.creator |
06 | local playerName = creator.Value |
07 | print (game.Players:FindFirstChild(playerName)) |