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: Schrodinger's workspace

Previous Thread :: Next Thread 
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
26 Feb 2014 12:55 PM
print(workspace:IsA("Model") ~= workspace.ClassName=="Model")
->false

Workspace is both a model and not a model
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
26 Feb 2014 01:25 PM
do u even inheritance
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
26 Feb 2014 01:27 PM
Actually I misread. Assuming the RHS is evaluated first (I can't remember if that's left associative or right associative), you basically have "false ~= false" which is false.
Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
26 Feb 2014 01:30 PM
Or not...
According to the wiki, Workspace extends RootInstance extends Model extends PVInstance extends Instance.


I'm confused now. And tired.
Report Abuse
Merely is not online. Merely
Joined: 07 Dec 2010
Total Posts: 17266
26 Feb 2014 01:36 PM
There's nothing strange about this.

The IsA method returns true if the instance's class is a subclass of the given class name. For example:

return Instance.new("Part"):IsA("BasePart") -> true

The part's classname is Part, but it inherits from BasePart.

Same goes for Workspace. It inherits from Model. So Workspace's class name is "Workspace" and Workspace:IsA("Model") returns true, even though Workspace.className ~= "Model"
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
26 Feb 2014 10:24 PM
@Merely but Workspace's class is "Workspace", not "Model"

What he has is true ~= false

which should be true, assuming Workspace is a model.
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
26 Feb 2014 10:27 PM
Workspace inherits from model.
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
26 Feb 2014 10:27 PM
To further myself,

> print(workspace:IsA("Model") ~= workspace.ClassName=="Model", workspace:IsA("Model"), workspace.ClassName == "Model")
false true false

Workspace is a model, true
Workspace's class name isn't model, false

true ~= false

But, yet

> print(true ~= false)
true

so I'm confused.
Report Abuse
bohdan77 is not online. bohdan77
Joined: 10 Aug 2008
Total Posts: 7944
26 Feb 2014 10:30 PM
I'm confused now.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
26 Feb 2014 10:37 PM
you nobs

print(workspace:IsA("Model") ~= workspace.ClassName=="Model")

...

a = workspace:IsA("Model") ~= workspace.className
b = "Model"

print( a == b )

make sense now?
Report Abuse
200AB is not online. 200AB
Joined: 24 Aug 2010
Total Posts: 1604
26 Feb 2014 10:41 PM
What Oysi said.

I think everyone knew this originally, but ended up confusing themselves.

Case closed!
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
26 Feb 2014 10:42 PM
nono, whitespace confused them

silly scripters
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