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 » Game Design
Home Search
 

Re: 'midnight is a nil value'

Previous Thread :: Next Thread 
Pizzarius is not online. Pizzarius
Joined: 12 Mar 2011
Total Posts: 260
05 Jun 2016 02:54 PM
local player = script.Parent.Parent.Parent
local storage = game.ServerStorage
local midnight = storage.Midnight
local phase = storage.Phaseflame

if player.Name == "fruit09" or player.Name == "Pizzarius" then
midnight:clone().Parent = player.Backpack
phase:clone().Parent = player.Backpack
end



Halo, Owner of Hydra Studios.
Report Abuse
HalfCircuit is not online. HalfCircuit
Joined: 20 Apr 2011
Total Posts: 5018
05 Jun 2016 03:02 PM
I could be wrong, but I'm pretty sure a client can't access the server storage. You have to keep things in replicated storage.

On another note, you should be using a local script since it's client sided (unless you have a reason to use a regular script).
With a local script, the player object can be accessed via game.Players.LocalPlayer instead of the path you have above.
Report Abuse
Pizzarius is not online. Pizzarius
Joined: 12 Mar 2011
Total Posts: 260
05 Jun 2016 03:11 PM
There is no error but it didnt work.


Halo, Owner of Hydra Studios.
Report Abuse
HalfCircuit is not online. HalfCircuit
Joined: 20 Apr 2011
Total Posts: 5018
05 Jun 2016 03:11 PM
Use replicated storage.
Report Abuse
Pizzarius is not online. Pizzarius
Joined: 12 Mar 2011
Total Posts: 260
05 Jun 2016 03:12 PM
I did


Halo, Owner of Hydra Studios.
Report Abuse
HalfCircuit is not online. HalfCircuit
Joined: 20 Apr 2011
Total Posts: 5018
05 Jun 2016 03:13 PM
add a wait(10) to the top of the script, and see if it works after 10 seconds
Report Abuse
Pizzarius is not online. Pizzarius
Joined: 12 Mar 2011
Total Posts: 260
05 Jun 2016 03:16 PM
Didn't work


Halo, Owner of Hydra Studios.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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