lee606
|
  |
| Joined: 23 Sep 2008 |
| Total Posts: 606 |
|
|
| 06 Aug 2011 12:10 PM |
Hi there i was wondering about getting into scripting values and was wondering if somebody could explain about values and how i could use them.
I had a vauge idea that goes somethign like this dist = 30
function onClicked() script.parent.Value1 = true end script.Parent.ClickDetector.MouseClick:connect(onClicked)
in another script id have this
dist = 30
function onClicked() script.parent.Value2 = true end script.Parent.ClickDetector.MouseClick:connect(onClicked)
and in another script id have this
If game.Workspace.brick1.Value1 = true and If game.Workspace.brick2.Value2 = true then game.Workspace.brick3.Cancollide = false game.Workspace.brick3.Transparency = 0.6
What i also need to know is which values to use to make this happen because when i open the insert>Object list there are different values e.g. Colourvalues,Cframe and Bool values and i have no idea which one i should use
Thanks for your help
|
|
|
| Report Abuse |
|
|
nexus4345
|
  |
| Joined: 14 Apr 2009 |
| Total Posts: 398 |
|
| |
|
|
| 06 Aug 2011 12:15 PM |
use a bool value, and have them defeautly false. and when you click the they turn true. and on the last script it needs to be this:
if Workspace.brick1.Value1 = true and Workspace.brick2.Value2 = true then Workspace.brick3.CanCollide = false Workspace.brick3.Transparency = .6 end |
|
|
| Report Abuse |
|
|
lee606
|
  |
| Joined: 23 Sep 2008 |
| Total Posts: 606 |
|
|
| 06 Aug 2011 02:16 PM |
For some reason the scripts arent working.
Heres what i have.
Script one
dist = 30 --change this to how far away you can be function onClicked() script.parent.Value1.Value = true end
Script 2
script.Parent.ClickDetector.MouseClick:connect(onClicked) dist = 30 --change this to how far away you can be function onClicked() script.parent.Value2.Value = true end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Script 3
if script.Parent.Parent.brick1.Value1.Value = true and Workspace.brick2.Value2.Value = true then wait(2) script.Parent:Remove() end)
|
|
|
| Report Abuse |
|
|
lee606
|
  |
| Joined: 23 Sep 2008 |
| Total Posts: 606 |
|
| |
|
lee606
|
  |
| Joined: 23 Sep 2008 |
| Total Posts: 606 |
|
| |
|
nexus4345
|
  |
| Joined: 14 Apr 2009 |
| Total Posts: 398 |
|
|
| 06 Aug 2011 09:09 PM |
Script 3 function Remover() if script.Parent.Parent.brick1.Value1.Value == true and Workspace.brick2.Value2.Value == true then wait(2) script.Parent:Remove() end end script.Parent.Parent.brick1.Value1.Changed:connect(Remover) Workspace.brick2.Value2.Changed:connect(Remover) |
|
|
| Report Abuse |
|
|