kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 23 Jul 2013 07:15 PM |
Okay, you have seen Minecraft right? Well. I was thinking of re-makeing the RedStone things. I wasent going to go make them look like Minecraft. but I was going to make things like them. Anyway I was thinking. How would I go about this?
For such as. this:
Find the Value.Value = true
if script.Parent.Value.Value = true then Blah Blah Blah Code end
Or should I use some other method of this?\
-- Also I might be posting some other help. Stay tuned. |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2013 07:17 PM |
if script.Parent.Value.Value == true then --code end
*Tell me about the rabbits, George* |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 23 Jul 2013 07:18 PM |
| .. I can script. Thanks for helping... I knew you had to use two = signs. I was typeing fast. Have anything to tell me about what I asked please? |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2013 07:21 PM |
| What's wrong with the way you have it? |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 23 Jul 2013 07:26 PM |
Nothing, really Just seams like if I dont study the code every day it might get confuseing and I dont know what a way I could do the Ifs without While true do Here is my code. DOnt know why its not working. Havent looks into it that much,
-- Locals local item = script.Parent.Parent local redlight = Instance.new("PointLight") redlight.Color = Color3.new(255/255,0/255,0/255) -- Code
while true do wait(.1) if script.Parent.Value == true then redlight.Parent = item end end --Connections |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2013 07:27 PM |
Could you rephrase what you said?
I didn't really understand. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 23 Jul 2013 07:27 PM |
| Wait Wait. Im going to use Number values insted. They might be able for me to be more flexable if I run into somthing. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 23 Jul 2013 07:28 PM |
Sorry. Typeing fast..
Nothing, really.
Just seams like if I dont study the code every day it might get confuseing
I also dont know a non-laggy way to be persice with the If without while true do..
Here is my code. DOnt know why its not working. Havent looks into it that much, |
|
|
| Report Abuse |
|
|
|
| 23 Jul 2013 07:30 PM |
You could use a function such as Changed.
script.Parent.Value.Changed:connect(function() redlight.Parent = item end)
I believe that would work.
Also, what changes the value of script.Parent.Value?
*Tell me about the rabbits, George* |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 23 Jul 2013 07:45 PM |
When I use this:
script.Parent.Value.Changed:connect(function()
It says:
Workspace.RedTorch.Value.Script:8: attempt to index field 'Value' (a number value)
Why should it matter? |
|
|
| Report Abuse |
|
|