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: Need help with a script

Previous Thread :: Next Thread 
rex103 is not online. rex103
Joined: 03 Oct 2008
Total Posts: 162
26 Jul 2012 09:22 PM
Hey, I'm new to scripting, and don't really understand much yet, but i wrote this script:

function OnTouched (hit)
game.Workspace.Captureb
game.Workspace.Captureb.BrickColor=BrickColor.new(255)
game.Workspace.Stand.BrickColor=BrickColor.new(255)
print(The Checkpoint Has Been Taken)
end


what is is supposed to do, is when you touch a button, it, and the plate it is on top of is supposed to turn Really Blue (255?), and is is supposed to print
The Checkpoint Has Been Taken

Is there anything that I did wrong, or some thing I could add to make it work?

I would really like to know how to script stuff, and I think if I could get this to work, it would be a good start.
Report Abuse
ballen7 is not online. ballen7
Joined: 26 Sep 2008
Total Posts: 819
26 Jul 2012 09:36 PM
function OnTouched (hit)
game.Workspace.Captureb
game.Workspace.Captureb.BrickColor=BrickColor.new(255)
game.Workspace.Stand.BrickColor=BrickColor.new(255)
print(The Checkpoint Has Been Taken)
end
game.Workspace.Captureb.Touched:connect(OnTouched)
Report Abuse
rex103 is not online. rex103
Joined: 03 Oct 2008
Total Posts: 162
26 Jul 2012 09:47 PM
Thanks, but I inserted it into the brick, and nothing happened when i touched it.
Anybody have any ideas?
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
26 Jul 2012 10:13 PM
Put this in the button.

function OnTouched(hit)
game.Workspace.Captureb.BrickColor=BrickColor.new(255)
game.Workspace.Stand.BrickColor=BrickColor.new(255)
print(The Checkpoint Has Been Taken)
end
script.Parent.Touched:connect(OnTouched)

† KMXD †
Report Abuse
rex103 is not online. rex103
Joined: 03 Oct 2008
Total Posts: 162
27 Jul 2012 07:50 AM
I tired that, and when I went on pley solo, the output box said:

Workspace.Captureb.Script:7: ')' expected near 'Checkpoint'

And after having lots of problems witht the print part, i chaged it to just "Checkpoint taken", so it looked like this:

function OnTouched(hit)
game.Workspace.Captureb.BrickColor=BrickColor.new(255)
game.Workspace.Stand.BrickColor=BrickColor.new(255)
print(Checkpoint taken)
end
script.Parent.Touched:connect(OnTouched)

I tested it and the output box said

Workspace.Captureb.Script:7: ')' expected near 'taken'

I'm really confused now, it just seems like it should work

Report Abuse
Dr01d3k4 is not online. Dr01d3k4
Joined: 11 Oct 2007
Total Posts: 17916
27 Jul 2012 07:52 AM
script.Parent.Touched:connect(function ()
game.Workspace.Captureb.BrickColor = BrickColor.new(255);
game.Workspace.Stand.BrickColor = BrickColor.new(255);
print("The Checkpoint Has Been Taken");
end);
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