How would I get the Character's Player from the Character itself?

I’m trying to disable tools when a target character is detained but I’m not sure how to get the target character’s “Player”

I’ve looked for solutions on the dev forum but I cannot find anything so far.

In a nutshell, I want to get the characters “player” from the player’s character in a string. (I don’t know what it’s call but its one of these

script.parent.blahblah

If that makes sense.
Here is a visualization to make it easier if you got confused.

2 Likes

I don’t get the question, you make it kinda difficult?
If you’re trying to get Player from character do this

local Character = game.Players:GetPlayerFromCharacter(CharacterInstance)
1 Like

Huh, it seems like my intelligence level confused you. (not very high btw)
Sorry for the trouble.
But thanks for the awnser!

I want to get the characters “player” from the player’s character in a string.
you can’t store stuff in a string
you can do it in a table
like

local ta = {
}
ta[Player] = Player.Character

^ Just example

Okay, thank you. :slight_smile:

1 Like

Making this because of a misunderstanding, I sincerely apologize for the incorrect words.

local Character = game.Players:GetPlayerFromCharacter(CharacterInstance)

That is what I was looking for, sorry if I was making it difficult.