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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: workspace v/s game.Workspace , Whats the difference?

Previous Thread :: Next Thread 
Raildex is not online. Raildex
Joined: 06 Dec 2009
Total Posts: 934
19 Jan 2017 12:43 PM
is there any benefits to using one over the other?
Report Abuse
Snowskateer is not online. Snowskateer
Joined: 06 Dec 2011
Total Posts: 4647
19 Jan 2017 12:44 PM
workspace saves you 5 characters

NOW GATHER, UNDER THE NAME OF TEAM ROCKET!
Report Abuse
12904 is online. 12904
Joined: 29 Oct 2012
Total Posts: 441
19 Jan 2017 03:06 PM
^
Report Abuse
mani_fold is not online. mani_fold
Joined: 23 Dec 2016
Total Posts: 546
19 Jan 2017 03:08 PM
This is a genuine question. ROBLOX discourages the use of Instance.new("Thing",parent) in favor of setting the parent directly, for it is more costly to drop it right away into the parent. Seems like it's just a shortcut, right? But indeed there is more to it than just 'saving' a few characters.

Perhaps there is some hidden background of which we are unaware O.o
Report Abuse
DoNotReadThisNamePlz is not online. DoNotReadThisNamePlz
Joined: 01 Aug 2014
Total Posts: 679
19 Jan 2017 03:09 PM
game.Workspace looks better and is good etiquette.
Report Abuse
mani_fold is not online. mani_fold
Joined: 23 Dec 2016
Total Posts: 546
19 Jan 2017 03:15 PM
Agreed, it's better form imho.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
19 Jan 2017 03:20 PM
workspace is a built-in keyword... why not use it?
Report Abuse
DoNotReadThisNamePlz is not online. DoNotReadThisNamePlz
Joined: 01 Aug 2014
Total Posts: 679
19 Jan 2017 03:21 PM
The look of a script is very important to me.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
19 Jan 2017 03:22 PM
so you'll use cosmetics over efficiency?
i'd like to see one of your scripts
Report Abuse
mani_fold is not online. mani_fold
Joined: 23 Dec 2016
Total Posts: 546
19 Jan 2017 03:23 PM
After some experiments there appears to be no more than a 1/10000th of a second's delay when the server accesses workspace as opposed to game.Workspace.
Report Abuse
mani_fold is not online. mani_fold
Joined: 23 Dec 2016
Total Posts: 546
19 Jan 2017 03:25 PM
@Un

That's not fair. Choosing game.Workspace is not "valuing cosmetics over efficiency," this is hardly an inefficient practice as much as it is a slightly inconvenient habit. The way a script appears is important, and in the vast majority of cases one can write a perfectly well-formatted script without sacrificing any degree of efficiency.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
19 Jan 2017 03:27 PM
are you serious? did i ever say that?
the way he said it implied that he cares more about how his scripts look rather than how efficient they are
using the workspace keyword isn't inefficient at all, i really hope you weren't being serious when you made that reply
Report Abuse
DoNotReadThisNamePlz is not online. DoNotReadThisNamePlz
Joined: 01 Aug 2014
Total Posts: 679
19 Jan 2017 03:28 PM
Function > Efficiency > Looks
But, they are all very important, and I do my best with scripts.
Report Abuse
mani_fold is not online. mani_fold
Joined: 23 Dec 2016
Total Posts: 546
19 Jan 2017 03:32 PM
take a chill pill their un, I'm not trying to be hostile.

I hardly think saying "the way a script looks matters to me," or something like that, carries the implication that this person cares more about indentations than script structure. All I'm saying is that you were putting some words in his mouth, that's all. And your previous remark supports this.

And yes, I was being completely serious.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
19 Jan 2017 03:33 PM
"cares more about indentations than script structure"
i didn't say anything like that lol
when he says that looks mean a lot to him that means to me like he'll sacrifice efficiency for it

and it's really hard to believe you were being serious when you said "After some experiments there appears to be no more than a 1/10000th of a second's delay when the server accesses workspace as opposed to game.Workspace."
Report Abuse
DoNotReadThisNamePlz is not online. DoNotReadThisNamePlz
Joined: 01 Aug 2014
Total Posts: 679
19 Jan 2017 03:35 PM
The looks of a script is extremely important. I will make my scripts as efficient as possible, while still keeping it looking good. If I ever release a script, it should be easily readable to everyone.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
19 Jan 2017 03:36 PM
that clears things up then
i'm still confused why you called using game.Workspace good etiquette though
Report Abuse
DoNotReadThisNamePlz is not online. DoNotReadThisNamePlz
Joined: 01 Aug 2014
Total Posts: 679
19 Jan 2017 03:37 PM
It just... Is..? I don't know why, but it just looks a lot better.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
19 Jan 2017 03:38 PM
so basically you're telling OP that referencing Workspace by using game.Workspace is good etiquette because it's your opinion that it's more visually appealing?

🤔
Report Abuse
mani_fold is not online. mani_fold
Joined: 23 Dec 2016
Total Posts: 546
19 Jan 2017 03:40 PM
I was. I ran two simple, functionally identical functions, one which referenced workspace, the other game.Workspace, and measured how long it took server to run these (nearly) identical functions. I scaled up the time to ensure accuracy, and found the differences to be less than 1/10000, measured in seconds, margin of error accounted for.

And I'm not really going to argue with you about your phrasing of your criticism, you don't really seem receptive to my objections. Anyway idk what value a protracted phrasing argument would add to this discussion.
Report Abuse
mani_fold is not online. mani_fold
Joined: 23 Dec 2016
Total Posts: 546
19 Jan 2017 03:41 PM
game.Workspace looks more professional, idk. It's a feeling, an opinion, not a wiki article.
Report Abuse
Eventive is not online. Eventive
Joined: 28 Jul 2011
Total Posts: 9827
19 Jan 2017 03:43 PM
No difference, but I use game.Workspace because for me it's weird seeing just Workspace.Part rather than game.Workspace.Part


ATR'er since 2013.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
19 Jan 2017 03:43 PM
mani show me the code you ran that resulted in that negligible difference
Report Abuse
Bobby_Darin is not online. Bobby_Darin
Joined: 05 Jan 2013
Total Posts: 5587
19 Jan 2017 03:43 PM
No, if there are "efficiency benefits" to using one more than the other they're more than negligible and ###### ## ##### if you care about them. Use whatever looks nicer to your eyes.
Report Abuse
Bobby_Darin is not online. Bobby_Darin
Joined: 05 Jan 2013
Total Posts: 5587
19 Jan 2017 03:44 PM
Nice filter.

If there are "efficiency" benefits to using one over the other, they're negligible enough that let's just say you're a little less than smart, perhaps not smart at all, if you care about those benefits.
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