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: What is the opposite of nil? Please tell me

Previous Thread :: Next Thread 
ipodman50 is not online. ipodman50
Joined: 24 May 2010
Total Posts: 43
28 Sep 2015 05:27 PM
I need some help
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
28 Sep 2015 05:32 PM
Nil doesn't really have an opposite that I'm aware of. The closest analogy saying the opposite of "nothing" is "something", but that mean a lot of things.
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
28 Sep 2015 05:33 PM
*can mean
Report Abuse
DermonDarble is not online. DermonDarble
Joined: 04 Jun 2015
Total Posts: 2576
28 Sep 2015 05:33 PM
not nil

DermonDarble is angry
Report Abuse
ipodman50 is not online. ipodman50
Joined: 24 May 2010
Total Posts: 43
28 Sep 2015 05:34 PM
I'm trying to make a script so it doesn't spa
function Points(hit)
local FINALLY = hit.Parent:FindFirstChild("Humanoid").Value
if (FINALLY ~= ???) then
Instance.new("StringValue", FINALLY)
end
end

script.Parent.Touched:connect(Points)m a value into the player.
Report Abuse
DermonDarble is not online. DermonDarble
Joined: 04 Jun 2015
Total Posts: 2576
28 Sep 2015 05:36 PM
if finally ~= nil then

DermonDarble is adorable
Report Abuse
ipodman50 is not online. ipodman50
Joined: 24 May 2010
Total Posts: 43
28 Sep 2015 05:37 PM
Then if someone keeps touching it, it will spam inside the players model. I want it so if it says oh it doesn't have this certain object I want it to insert the object in.
Report Abuse
DermonDarble is not online. DermonDarble
Joined: 04 Jun 2015
Total Posts: 2576
28 Sep 2015 05:37 PM
though it would be better to do

```
if finally then
--code
end
```

DermonDarble is baking
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
28 Sep 2015 05:38 PM
local FINALLY = hit.Parent:FindFirstChild("Humanoid").Value
if not FINALLY then
Instance.new("StringValue", hit.Parent:FindFirstChild("Humanoid"))
end
Report Abuse
Stymi is not online. Stymi
Joined: 19 Sep 2015
Total Posts: 1077
28 Sep 2015 05:41 PM
Argelius, you are doing what I call FindFirstChild abuse. Please read this:

"Q: Why do I get an error when I'm using FindFirstChild?

A: I like to refer to this term as "FindFirstChild abuse", and it's a really common problem. The thing is, most people don't notice it because whatever you're looking for will usually exist in some cases, but if it doesn't, this could lead to game breaking bugs.

Now, this is what I'm talking about.
if workspace:FindFirstChild("TeamBrick").TeamValue.Value == "Blue" then
--code
end

That's actually very wrong. If you "keep going" after FindFirstChild, you are assuming that is true. It's like you didn't use FindFirstChild in the first place! Here's how to do it properly:

local teamBrick = workspace:FindFirstChild("TeamBrick")
if teamBrick then -- checking if teamBrick is true.
if teamBrick.TeamValue.Value == "Blue" then
-- code
end
end"


Now this looks like a job for me. So everybody, just follow me. Cause we need a little, controversy. Cause it feels so empty without me.
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
28 Sep 2015 05:43 PM
indeed
Report Abuse
Stymi is not online. Stymi
Joined: 19 Sep 2015
Total Posts: 1077
28 Sep 2015 05:43 PM
And in the Instance.new() call, that's not how you use FindFirstChild either same thing.


Now this looks like a job for me. So everybody, just follow me. Cause we need a little, controversy. Cause it feels so empty without me.
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
28 Sep 2015 05:47 PM
OP, what Sty is saying is that you should do this:

if hit.Parent:FindFirstChild("Humanoid") then
local FINALLY = hit.Parent.Humanoid.Value
if not FINALLY then
Instance.new("StringValue", hit.Parent.Humanoid)
end
end
Report Abuse
Someguy1002 is not online. Someguy1002
Joined: 27 Dec 2012
Total Posts: 195
28 Sep 2015 05:49 PM
local nilornot = 0

if nilornot =< 0 then
if nil then
nilornot = 1
else
if not nil then
nilornot = 0
end
end
nilornot = 0
end
Report Abuse
ipodman50 is not online. ipodman50
Joined: 24 May 2010
Total Posts: 43
28 Sep 2015 05:50 PM
I give up ;-;
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
28 Sep 2015 05:51 PM
What's the problem now?
Report Abuse
Someguy1002 is not online. Someguy1002
Joined: 27 Dec 2012
Total Posts: 195
28 Sep 2015 05:52 PM
http://wiki.roblox.com/index.php?title=Metatable
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
28 Sep 2015 05:54 PM
We don't need metatables; are you trolling
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