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 » Scripting Helpers
Home Search
 

Re: Help with values

Previous Thread :: Next Thread 
lee606 is not online. 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 is not online. nexus4345
Joined: 14 Apr 2009
Total Posts: 398
06 Aug 2011 12:11 PM
You need a bool value
Report Abuse
Duderino99 is not online. Duderino99
Joined: 04 Aug 2009
Total Posts: 320
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 is not online. 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 is not online. lee606
Joined: 23 Sep 2008
Total Posts: 606
06 Aug 2011 02:57 PM
Bumples
Report Abuse
lee606 is not online. lee606
Joined: 23 Sep 2008
Total Posts: 606
06 Aug 2011 03:46 PM
bump
Report Abuse
nexus4345 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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