I attempted testing out a part that would get a player's Character with :FindFirstChild(). Here's the script:
script.Parent.Touched:Connect(function(part)
local parent = part.Parent
local plr = game.Players:GetPlayerFromCharacter(parent)
if parent and plr then
local char = plr:FindFirstChild("Character")
end
end)
However, "char" returns a nil value. Why is this the case?

1 comment
parent of touchpart is the character, you only need to check if can get player by parent of touchpart. if you can get the player the parent is your character. And you can't use FindFirstChild to get character. only plr.Character, and if you want to get character with plr.Character you can add a check if character exists. example: local char = plr.Character if char then ... end