So, when I was messing around with studio, I decided to make a small game. I made a script to return the Players in the "Players" menu in the Explorer.
I used print to check if the script was working, however, when I ran the game, an error popped up in the output that said " Workspace.Script:3: function arguments expected near 'print' ".
In case you were wondering, this was the test script I used:
local returnedPlayers = game.Players:GetPlayers
print(returnedPlayers) -- printed the table
Then I tried to use functions to fix the issue:
local returnedPlayers = game.Players:GetPlayers
function testPrint() -- the function
print(returnedPlayers) -- printed the table
end
testPrint() -- calls the function
But the error still persisted. (The only difference was "print" was changed into "function".) However, when I first used studio, it worked fine. Can someone explain what changed or what I am doing wrong?

1 comment
You forgot the (). It should be :GetPlayers()