generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Why does is say argument 1 is missing?

Previous Thread :: Next Thread 
bubbaman73 is not online. bubbaman73
Joined: 02 Feb 2013
Total Posts: 795
28 Aug 2016 12:18 PM
So this part of my script keeps erroring(Line 35 in specific) And it says im missing argument 1. But i dont seem to be missing one as far as i can see.

Code:

CardCzar = PlayingPlayers[math.random(1,#PlayingPlayers)]
for i, player in pairs(PlayingPlayers) do
local IsCzar = false
if player.Name == CardCzar then
IsCzar = true
game.Players:FindFirstChild(player.Name).PlayerGui.Main.Role:FireClient(IsCzar)
else
IsCzar = false
game.Players:FindFirstChild(player.Name).PlayerGui.Main.Role:FireClient(IsCzar) --line 35
end
end

Error:

12:14:08.671 - Argument 1 missing or nil
12:14:08.672 - Stack Begin
12:14:08.673 - Script 'ServerScriptService.ServerMain', Line 35
12:14:08.674 - Stack End


~Bubba~
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
28 Aug 2016 12:21 PM
Keep your RemoteEvents in a place where both the client and server can access them, like the ReplicatedStorage.


Report Abuse
bubbaman73 is not online. bubbaman73
Joined: 02 Feb 2013
Total Posts: 795
28 Aug 2016 12:31 PM
I am


~Bubba~
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
28 Aug 2016 12:34 PM
Store remote events in ReplicatedStorage. You can't access PlayerGuis from the server with FE (im assuming you're using fe since you have re's). You need to send the info from the server to the client.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image