PlayerScripts Not Being found & player returning as nil

PlayerScripts is not visible to the server as it is a container created by the client for client-side scripts. It is unable to see or access PlayerScripts in any way. This is assuming this code is on the server. You will need a different way to give the script or activate it.

You should also check if the player actually exists, as GetPlayerFromCharacter can return nil. You assume a truthy value is returned from this function call.

local plr = game:GetService("Players"):GetPlayerFromCharacter(humanoid)
if plr then
    -- Yes player exists
end
4 Likes