Hi, I don’t know why is this happening, but when doing game.Palyers:GetPlayerFromCharacter(actualkiller) (Players variable is game.Players) it returns nil. I checked the actual killer variable by printing it, and it prints the player value. https://gyazo.com/8c1ae3cefb7cf8ec2120281e51eea2f4
any idea on what could be going on? like if the variable contains the name of the player, why does it return nil?
-- i forgot to add a players variable
local players = game:GetService('Players') -- if you change the name of players, it wont affect
local player = players:GetPlayerFromCharacter(workspace:WaitForChild('FartMaster69'))
if (not player) then return print('the rig is just a normal rig') end
print(('%s is a memer'):format(player.Name))
Could it be that actualkiller is the Player instance? Print out the ClassName of actualkiller, if it returns Player, then you already have the player instance
What did you use for the print? print(actualkiller.ClassName)? If so, odd. Maybe you may need to use FindFirstChild using the name of the thing in the value instead of GetPlayerFromCharacter?
oke, I mark this as a solution cuz I found the problem thanks to printing classnames. it was getting the playername from workshop, not frommPlayers folder. I now know how to do it. again thx!