|
| 13 Feb 2016 09:02 PM |
Tried asking on previous thread but it didn't get a reply.
How can I use a Equal (==) without if statements or loops.
For example (on it's own): a == b
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:04 PM |
b1
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 13 Feb 2016 09:05 PM |
local test = (1 == 1)
test is now true |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 13 Feb 2016 09:06 PM |
Now what purpose would that serve exactly?
|
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:06 PM |
I'm not an expert scripter, could you elaborate on that please.
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:07 PM |
Basically changing values.
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 13 Feb 2016 09:07 PM |
| why do you want to use this operator? |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:09 PM |
I said changing values that are located already in the game.
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:10 PM |
For like if I want to do this
a = a + 1
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 13 Feb 2016 09:10 PM |
that's the purpose of the '=' operator, though
|
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:11 PM |
a == a + 1*
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:13 PM |
...
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:14 PM |
I've tried everything.
but "==" persists as an error.
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|
|
| 13 Feb 2016 09:20 PM |
Rude...
I'm not trolling, I am just really bad at remembering lua, that's why I may "sound" dumb.
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Feb 2016 09:22 PM |
Oh yeah sure...
That's why I made 2 threads on this.
Srsly, the roblox wiki isn't helping, I'm just trying make something to display a score from an IntValue.
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:25 PM |
Oh come on, it's a bit unfair I am being pushed around on this, If someone can actually go through this with me, I'll be helpful, I'm so close to completing something, and is just blocking my path.
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:25 PM |
it'll*
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029
|
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:26 PM |
the operator '==' is only for if statements and loops, you just use '=' otherwise
EX:
if 1 == 2 then print("Okay then") end
^ that would work
if 1 = 2 then print("Okay then") end
^ this would not
lets do another:
workspace.level.Value = workspace.level.Value + 1
that would increment the number value 'level' every time it ran
|
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:28 PM |
Ok, I get that, but when I run it on the game, the value isn't changing, I've got the right path.
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Feb 2016 09:30 PM |
function onClicked() wait(.1) script.Parent.Visible = false script.Parent.Parent.Give.Visible = true script.Parent.Parent.Score.Value = script.Parent.Parent.Score.Value + 1 wait(.1) script.Parent.Parent.Give.Visible = false script.Parent.Visible = true end
script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:31 PM |
#1) are you in a text button #2) does it do everything before the increment of the value
|
|
|
| Report Abuse |
|
|
|
| 13 Feb 2016 09:33 PM |
It isn't a text button, but it is a image button.
Yes everything is working apart from the value change,
I can't think of a siggy, While you're at it, join this http://www.roblox.com/My/Groups.aspx?gid=2761029 |
|
|
| Report Abuse |
|
|