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?

Previous Thread :: Next Thread 
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
18 May 2014 07:22 PM
Why is this valid
local ws = Workspace
but this isn't?
local p = Players
Report Abuse
TheLuaWeaver is not online. TheLuaWeaver
Joined: 09 Feb 2010
Total Posts: 1504
18 May 2014 07:23 PM
...and you made http://web.roblox.com/Groups/group.aspx?gid=1087701, copying the logo of Master Scripter.
Report Abuse
dogwarrior24 is not online. dogwarrior24
Joined: 10 Nov 2010
Total Posts: 1401
18 May 2014 07:24 PM
This is not scripting helpers

The reason is that there is not a set variable for Players,

To index workspace you can simply write
Workspace.Index
Because there is a set variable for Workspace

To index players you must index game first
game.Players.Index
Because there is no set variable for Players
Report Abuse
Seranok is online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
18 May 2014 07:24 PM
When you type:

local ws = Workspace

You are really saying

local ws = GLOBAL_ENVIRONMENT["Workspace"]

Where GLOBAL_ENVIRONMENT is a table which contains things like print, loadstring, pairs, game, etc. Basically everything you can access.

And it just so happens that while there's a shortcut for Workspace, there is none for Players. So you have to do game:GetService("Players")
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
18 May 2014 07:26 PM
@TheLua

I sent the owner of MasterScripters a message telling him I was going to do that, and he didn't object.

@Dog

This thread belongs here. I'm not giving you a script to fix, I'm just asking a question I've been wondering.
Report Abuse
Seranok is online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
18 May 2014 07:27 PM
So basically ROBLOX was like "People will get tired of typing game.Workspace, let's just make a shortcut so they can type Workspace." But they did no such thing for Players.
Report Abuse
TheLuaWeaver is not online. TheLuaWeaver
Joined: 09 Feb 2010
Total Posts: 1504
18 May 2014 07:33 PM
Help:
1. the action of helping someone to do something; assistance.
Request:
1. an act of asking politely or formally for something.

You're asking (requesting) for assistance in understanding a concept (help). Help. Requesting. Help Request.

"Anything about scripting that is not a help request or topic belongs here." - scripters

Put it in god damn scripting helpers.
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
18 May 2014 07:44 PM
Workspace = shortcut for game.Workspace or game:GetService("Workspace")

There isn't one for Players. Use p = game.Players or p = game:GetService("Players")
Report Abuse
TheLuaWeaver is not online. TheLuaWeaver
Joined: 09 Feb 2010
Total Posts: 1504
18 May 2014 07:47 PM
Oh, and I'd also like to point out how stupid it was that you thought he was okay with the logo thing. He does not come on often, and has almost certainly not read your message. A lack of objection is not permission. If I walk up to a sleeping man, whisper "Can I borrow all of your money", and then take it because he didn't say no, I'm still a thief.
Report Abuse
NotAshley is not online. NotAshley
Joined: 16 Jan 2014
Total Posts: 14257
18 May 2014 07:50 PM
Seriously guys, this thread is just asking a simple question. A part of the reason I dislike the Scripters forum so much is the way you all attack anyone who asks a question.

@op see my answer a couple posts above, I answered it without being edgy
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
18 May 2014 08:16 PM
wrong forum
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