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

in a tutorial, the teacher uses game.Players.PlayerAdded:Connect(onPlayerJoin) ?

the code only works in his example file, normally i've been referencing the Players object using this first:

local Players = game:GetService("Players")

why is the 'game' static function not working in my own project?

1 answer

it was working, nevermind. turns out I had 2 parenthesis after onPlayerJoin

game.Players.PlayerAdded:Connect(onPlayerJoin())

when mine should have been

game.Players.PlayerAdded:Connect(onPlayerJoin)

1 comment

0

Good Job!

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