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: Just learning and need help with a locked brick

Previous Thread :: Next Thread 
redac1 is not online. redac1
Joined: 07 Nov 2009
Total Posts: 473
17 Aug 2012 07:54 PM
Im learning to script and these are the requirments...
Your Task:
Make a script that does the following.
1. Make a part invisible
2. Wait five seconds
3. Make the same part Locked
4. Wait three seconds
5. Make the same part visible again
I dont know how to make the part locked, also i dont know how to run the script.
When i press the green button nothing happens. This is my script im using:
-----------------------------------------------------
myPart = Instance.new("Part")
myPart.Parent = Workspace
myPart.Transparency = 1
wait (5)
myPart.Transparency = 0
------------------------------------------------------
Please help thanks!
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
17 Aug 2012 07:55 PM
My task is to tell you that you're a snob...
Report Abuse
redac1 is not online. redac1
Joined: 07 Nov 2009
Total Posts: 473
17 Aug 2012 08:00 PM
anyone?
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
17 Aug 2012 08:02 PM
myPart.Locked = true
Report Abuse
ballen7 is not online. ballen7
Joined: 26 Sep 2008
Total Posts: 819
17 Aug 2012 08:06 PM
You need to define the Part you are creating more.


myPart.Position = Vector3.new(4, 4, 4)
myPart.BrickColor = BrickColor.new(1)
myPart.Size = p.Size = Vector3.new(4, 1, 2)
Report Abuse
ballen7 is not online. ballen7
Joined: 26 Sep 2008
Total Posts: 819
17 Aug 2012 08:07 PM
lol sorry so heres the script

myPart = Instance.new("Part", Workspace)
p.Position = Vector3.new(4, 4, 4)
p.Size = Vector3.new(4, 1, 2)
p.BrickColor = BrickColor.new(1)


myPart.Transparency = 1
wait (5)
myPart.Transparency = 0
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
17 Aug 2012 08:07 PM
You don't NEED to but..
Report Abuse
leolion113 is not online. leolion113
Joined: 11 Oct 2008
Total Posts: 3336
17 Aug 2012 08:08 PM
@Ballen, he does not need to 'define' it more. When he instances a new part it will be the 'default' size, the only he would need to do is either anchor it, or position it. There is no need for sizing unless he needs it, which in this case he does not. He does not need to set the BrickColor either since it defaults to grey.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 Aug 2012 08:51 PM
keep it what he wants and dont add

do what u did, but the attribute to make it locked is, Locked [no dur]

so

part.Locked = true will lock the part


THAT IS ALL HE NEEDS TO KNOW
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
17 Aug 2012 08:54 PM
o, to run the script, learn the onTouched function

example

function onTouched(hit)
SCRIPT HERE
end

script.Parent.Touched:connect(onTouched)
Report Abuse
leolion113 is not online. leolion113
Joined: 11 Oct 2008
Total Posts: 3336
17 Aug 2012 08:55 PM
You do not need an event to make a script run. His way will only make it run once.
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