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!

Previous Thread :: Next Thread 
PuNiShEr5665 is not online. PuNiShEr5665
Joined: 12 Aug 2009
Total Posts: 33713
26 Mar 2012 05:33 PM
I'm trying to make a script so that when I touch a brick (Called Activate), a different brick called Map changes position to -176, 50.2, 86.5

I'm still new at scripting so expect this to completely fail (Lol):



function onTouched(Activate)
if Punisher5665.touched.Activate then
game.Workspace.Map.Position = Vector3.new(-176, 50.2, 86.5)
end
end

Punisher5665.Touched:connect(onTouched)



Don't really know if I can use myself in it lol

a little help wouldn't be great

Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
26 Mar 2012 05:36 PM
function onTouched(hit)
human = hit.Parent:findFirstChild("Humanoid")
if human then
game.Workspace.Map.Position = Vector3.new(-176, 50.2, 86.5)
end
end

script.Parent.Touched:connect(onTouched)

Put that in the brick.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
26 Mar 2012 05:37 PM
function onTouched(Activate)
if Activate.Parent.Name == "Punisher5665" then
game.Workspace.Map.Position = Vector3.new(-176, 50.2, 86.5)
end
end

script.Parent.Touched:connect(onTouched)

Btw, your sentence at the end. Do you mean a little help would be great :P?

Report Abuse
PuNiShEr5665 is not online. PuNiShEr5665
Joined: 12 Aug 2009
Total Posts: 33713
26 Mar 2012 05:39 PM
LOL I was thinking about something said and I guess wouldn't got into this...

Sorry,I meant to say Would be great
I feel stupid now lol
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
26 Mar 2012 05:42 PM
You're smarter then all the idiots out there just begging for a script :P
Report Abuse
PuNiShEr5665 is not online. PuNiShEr5665
Joined: 12 Aug 2009
Total Posts: 33713
26 Mar 2012 05:44 PM
I used to be one of those idiots :P

But now I'm taking a chance to try and learn on my own.

And your script works great :) Thanks :D
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
26 Mar 2012 05:53 PM
Yep. Anytime, love to help!

And stick to it. You'll be happy you did ;)
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