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: Hello Everyone! I'm starting a project!

Previous Thread :: Next Thread 
kingmatt2 is not online. 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
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
23 Jul 2013 07:17 PM
if script.Parent.Value.Value == true then
--code
end

*Tell me about the rabbits, George*
Report Abuse
kingmatt2 is not online. 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
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
23 Jul 2013 07:21 PM
What's wrong with the way you have it?
Report Abuse
kingmatt2 is not online. 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
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
23 Jul 2013 07:27 PM
Could you rephrase what you said?

I didn't really understand.
Report Abuse
kingmatt2 is not online. 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 is not online. 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
IAmReallyAwesome is not online. IAmReallyAwesome
Joined: 05 Mar 2010
Total Posts: 7371
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 is not online. 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
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