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: Can You Help Me?

Previous Thread :: Next Thread 
evilishnessII is not online. evilishnessII
Joined: 26 Mar 2011
Total Posts: 10275
07 May 2012 05:39 PM
I need to make a script.

Please note, YOU don't have to make it, I do. But it would be appreciated if you DID.

I just need some help figuring out how to make it.

So, the script is a simple touch-button door. I would like to know how to make it check the name of the object before it can go through the door.

The object is called CUBE. when it touches the button, the door opens. Nothing else can open it. Cube doesn NOT have a humanoid.

Report Abuse
ozza is not online. ozza
Joined: 11 Oct 2007
Total Posts: 726
07 May 2012 05:41 PM
script.Parent.Touched:connect(function(hit)
if hit.Name == "Cube" then
for i = 0,1,0.1 do
script.Parent.Transparency = i
script.Parent.CanCollide = false
wait()
end
for i = 1,0,0.1 do
script.Parent.Transparency = i
script.Parent.CanCollide = true
wait()
end
end
end)
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
07 May 2012 05:43 PM
@Ozza

"for i = 1,0,0.1 do"

You have to make it negative. If you make the third number positive it's already at that number, making the for loop end too early.
Report Abuse
ozza is not online. ozza
Joined: 11 Oct 2007
Total Posts: 726
07 May 2012 05:43 PM
Woops, forgot QQ.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
07 May 2012 05:45 PM
Everyone makes mistakes :D
Report Abuse
ozza is not online. ozza
Joined: 11 Oct 2007
Total Posts: 726
07 May 2012 05:49 PM
*starts singing hannah montana song*
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
07 May 2012 05:52 PM
You would listen to that.
Report Abuse
evilishnessII is not online. evilishnessII
Joined: 26 Mar 2011
Total Posts: 10275
07 May 2012 06:49 PM
Thanks!

I'll test it as soon as the update finishes.
Report Abuse
evilishnessII is not online. evilishnessII
Joined: 26 Mar 2011
Total Posts: 10275
07 May 2012 08:27 PM
I didn't use the whole script, just the part that checked for the name.

So.. Thanks! It worked!
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