i dont realy understand it
The function :GetPlayerFromCharacter()
will take the character model and give you the player corresponding to that. For example, let's say a player touched my part, and I want to display a message on their screen, I could use the function :GetPlayerFromCharacter()
to get the player model, like so:
script.Parent.Touched:Connect(function(hit) local character = hit.Parent local player = workspace:GetPlayerFromCharacter(character) if player then --code end end)