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

Is there a way to get player from normal script? [In variable]

Is there a way to get player from normal script?

2 comments

0

What do you mean?

0

game.Players.PlayerAdded:Connect(function(ThisVariableIsThePlayer) -- code here end) I'm pretty sure you wanted this

1 answer

✓ Accepted answer

This is not a request site, but ill cut you some slack.

game.Players.PlayerAdded:Connect(function(p)


end)

"p" is the player in this function.

This determines the player in this script.

Local Scripts get the player in a different way.

--In a local script

local player = game.Players.LocalPlayer

The last way of getting the player is by using,

local player = game:GetService("Players"). LocalPlayer

I hope this helps!

1 comment

0

Accept if this works.

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