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: Player Service Issue

Previous Thread :: Next Thread 
SammaeI is not online. SammaeI
Joined: 07 Mar 2014
Total Posts: 144
07 Feb 2017 09:19 PM
Making an Administrator script. Long-question short, after I execute the following script, it returns in error.

local Administrators = {'CI_Systems', 'SammaeI', 'Player1'}

game.Players.PlayerAdded:connect(function(player)
for _, v in pairs(Administrators) do
if player.Name == v then
print("Administrator has entered.")
local clone = game.ServerStorage.LocalScript:Clone()
clone.Parent = player.PlayerScripts
print("Tested")
end
end
end)
-- Note: LocalScript contains nothing; just a simple 'print("Hello World!"'

Goal is to insert a script in PlayerScripts within the Administrator player. I keep getting this error:

- ServerScriptService.Script:19: attempt to index local 'player' (a nil value)

idk.
Help would be indeed nice.
Report Abuse
SammaeI is not online. SammaeI
Joined: 07 Mar 2014
Total Posts: 144
07 Feb 2017 09:25 PM
bop
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
07 Feb 2017 09:33 PM
You need to give more info.

The error message you posted says the error is on line 19. There are not 19 lines in the code you posted.
Report Abuse
SammaeI is not online. SammaeI
Joined: 07 Mar 2014
Total Posts: 144
07 Feb 2017 09:34 PM
extra lines were just white spaces (non-used pieces of lines)
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
07 Feb 2017 09:35 PM
Where is the error at? You can't fix a problem without know what the problem is.
Report Abuse
SammaeI is not online. SammaeI
Joined: 07 Mar 2014
Total Posts: 144
07 Feb 2017 09:44 PM
local clone = game.ServerStorage.LocalScript:Clone()
clone.Parent = player.PlayerScripts
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