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

I keep getting Incomplete statement: expected assignment or a function call?

repeat wait() until game:IsLoaded()

Local plr = game.players.LocalPlayer <-----

3 comments

0

'Players' is spelt with a capital P.

0

that didn't work

0

is your script local or server and what is its parent

2 answers

try:

repeat wait() until game:IsLoaded()

local plr = game:GetService("Players").LocalPlayer
print(plr)

Players should be game.Players not game.players and Local should be local

2 comments

0

camelCase method referencing is considered a deprecated practice. Use TitleCase: ':GetService()'.

0

Good spot!. was my phones fault auto correcting >_> lol... Funny how it only capatalized Service and not Get .... strange....

You can’t get LocalPlayer in a server script. Simple

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