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
 

Module Script Issues

Previous Thread :: Next Thread 
wackeyhd5cool is online. wackeyhd5cool
Joined: 24 Nov 2010
Total Posts: 906
17 Dec 2016 06:23 PM
Hey could anyone spot what I'm doing wrong? Iterating through "settings" does not print anything. Also, "hi" does print.

server::

local settings = require(game.ReplicatedStorage.settings)

game.Players.PlayerAdded:connect(function(plr)
table.insert(settings,plr.Name)
settings[plr.Name] = "hi"
end)


client::

wait(5)
local settings = require(game.ReplicatedStorage.settings)

print("hi")
for i,v in pairs(settings) do
print(i,v)
end



r+
Report Abuse
Xstarlight is not online. Xstarlight
Joined: 18 Oct 2012
Total Posts: 870
17 Dec 2016 06:28 PM
Can't really help you unless you give us the module script "code".

And here:

settings[plr.Name] = "hi"

should be:

settings(plr, "Hi") --Being that function "setting" changes the players name from those two variables

you cannot make an event or "function" "equal" to something.

If the module is just a table then why is it in a module????

Report Abuse
wackeyhd5cool is online. wackeyhd5cool
Joined: 24 Nov 2010
Total Posts: 906
17 Dec 2016 07:00 PM
the module is just its default state:


module = {}

return module


r+
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
17 Dec 2016 07:09 PM
you cant set a module like that. you need to set it from within the module itself using one of its own functions


Report Abuse
wackeyhd5cool is online. wackeyhd5cool
Joined: 24 Nov 2010
Total Posts: 906
17 Dec 2016 09:51 PM
thank you


r+
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