Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

The connection between a Workspace player and their Players data?

The title says it all. I need to find the connection, probably a method between a Workspace player and their game.Players data.

Example: I have a Gui that I want cloned from a character in game.Workspace.Player32, and it to go to their PlayerGui. How do I make it go there without knowing their Player number?

4 comments

0

I answered on my last anser!!!

0

Typo^

1

:GetPlayerFromCharacter(). Plus the name would be the same.

0

@HexCD, first of all I didn't know you edited your answer. But anyway, your answer to my last question does not answer this one at all. @GoldenPhysics, perfect!Just the answer i was looking for! If you want to put it as an answer to this question I'll +1 it and accept it.

2 answers

local player = game.Players:GetPlayerFromCharacter(Workspace.Player32)

if player then
player.PlayerGui.ScreenGui.Frame.Visible = true
end

inverse

local character = game.Players.Player32.Character

if player then
character.Torso.Transparency = 1
end

I hope I help.

:GetPlayerFromCharacter()

That's all I needed. Props to GoldenPhysics for the answer.

This discussion is preserved as it was. New answers, comments, and votes are closed.