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 » Roblox » All Things ROBLOX
Home Search
 

Re: How to make a script that makes all windows and doors work?

Previous Thread :: Next Thread 
jeffrey252 is not online. jeffrey252
Joined: 03 May 2013
Total Posts: 723
25 Jul 2016 07:39 AM
Subject/Main Question:How to make a script that makes a door/window that pushes to open when its handle (window),knob (door) is clicked and a sliding window that slides when clicked,and a jalousie/louver window that works by clicking the crank to rotate the 5 glasses (make more than 1 brick rotate when the crank is clicked)?

If possible I also would like to know how to make a sliding window that slides when clicked,and a jalousie window (louver windows,search it in Google) that works like this:it has a crank/handle,when it is clicked,the glass slates(more than 1 brick,as there are a few glasses on a louver window) rotate.If anyone can tell me the scripts that I can learn from it. I'm not lazy to learn to script,but the fact that I want to learn how to script is the reason I'm asking for an example. I kept searching on the ROBLOX wiki torturials but it teaches other stuff like how to make a day/night cycle,lighting parts on fire (where makes a player get on fire when touches a fire brick by functions),making an explosion course and making a health pickup,which doesn't really directly helps me ,I want a tutorial to how to make windows and doors work.But it did help me to learn the basics,like variables,print,wait and a bit of the basics.
http://wiki.roblox.com/index.php?title=AllTutorials
Report Abuse
YourBlackYourMySlave is not online. YourBlackYourMySlave
Joined: 21 Jul 2016
Total Posts: 15
25 Jul 2016 07:41 AM
Ok ok here we go
1.I appreciate that you are trying to make ROblox work on Windows 98 or older
but it isn't possible
and i haven't heard of the Operating System called "Doors"
Windows and this thing called "doors" doesn't have a handle
Report Abuse
Jackudy3 is not online. Jackudy3
Joined: 22 Sep 2011
Total Posts: 8446
25 Jul 2016 07:42 AM
you're going to want to look into using vector3, functions, and the ClickDetector object
Report Abuse
Xarmut is not online. Xarmut
Joined: 05 May 2012
Total Posts: 14604
25 Jul 2016 07:47 AM
idk
Report Abuse
jeffrey252 is not online. jeffrey252
Joined: 03 May 2013
Total Posts: 723
25 Jul 2016 07:48 AM
So is there a simple example of a script that makes 1 or more bricks rotate when a handle is clicked? I understand that I have to insert ClickDetector to the handle/knob/etc and I need a script to make it work. It's just so hard to make a true working script,like
why can't I just put
function onClicked(playerWhoClicked)
game.workspace.window.Rotation:+10
end

game.workspace.handle.ClickDetector.MouseClick:connect(onClicked)

but that won't work,which makes me think scripting is hard.
Report Abuse
senseib is not online. senseib
Joined: 28 Feb 2014
Total Posts: 345
25 Jul 2016 07:49 AM
Noobs are foruming [2]

It's a troll.


Report Abuse
Icillia is not online. Icillia
Joined: 19 Jan 2016
Total Posts: 2337
25 Jul 2016 07:50 AM
wiki.roblox.com/index.php?title=CFrame
Report Abuse
cornholio234 is not online. cornholio234
Joined: 22 Oct 2010
Total Posts: 15142
25 Jul 2016 07:52 AM
I usually just do it like this I think.

Instead of Rotation, use Vector3.

function onClicked(playerWhoClicked)
game.Workspace.window.Vector3 = Vector3.new(0,0,0) -- put the position you want the part to be in when you click the window
end

game.Workspace.handle.ClickDetector.MouseClick:connect(onClicked)

I'm not the best scripter though, you might want to ask Scripting Helpers for advice for it.

Report Abuse
cornholio234 is not online. cornholio234
Joined: 22 Oct 2010
Total Posts: 15142
25 Jul 2016 07:54 AM
You can find the position of what you want the part to rotate to, by rotating it and copying/pasting the rotation value under properties into the script I think
Report Abuse
jeffrey252 is not online. jeffrey252
Joined: 03 May 2013
Total Posts: 723
25 Jul 2016 07:57 AM
I'm not a noob or troll,I really want to learn how to script,I joined ROBLOX since 2012 but my old account just got deleted,I had made fun games on my old account and on my new account I have made houses/apartments and rebuilt them a few times to improve my building skills. So my building skills is considered good enough now. So,I want to make stuff in the house that I have built work,which is the windows and doors to make the house game more interesting,so I have to learn how to script. Here's proof,I just made the place inactive. This is the 3rd version,which means I rebuilt it 3 times,the 1st and 2nd version used to have a very tall proper apartment (12 houses of this/12 floors) but I just made 1 floor for this one so that it doesn't lag/take long to load.
https://www.roblox.com/games/179211679/Residential-Apartment
Report Abuse
Urxa is not online. Urxa
Joined: 24 May 2012
Total Posts: 4586
25 Jul 2016 07:58 AM
idk[2]
Report Abuse
jeffrey252 is not online. jeffrey252
Joined: 03 May 2013
Total Posts: 723
25 Jul 2016 08:00 AM
Should I rotate the glass then see it's position first so that the glass rotates to the position I want?
Report Abuse
cornholio234 is not online. cornholio234
Joined: 22 Oct 2010
Total Posts: 15142
25 Jul 2016 08:14 AM
"Should I rotate the glass then see it's position first so that the glass rotates to the position I want?"

Yes, that would be pretty fine, I think
Report Abuse
jeffrey252 is not online. jeffrey252
Joined: 03 May 2013
Total Posts: 723
25 Jul 2016 08:16 AM
What if I want to make more than 1 brick rotate when the handle is clicked? Should I just add more below like this?
function onClicked(playerWhoClicked)
game.Workspace.window.Vector3 = Vector3.new(0,0,0)
game.Workspace.window2.Vector3 = Vector3.new(0,0,0)
game.Workspace.window3.Vector3 = Vector3.new(0,0,0) -- put the position you want the part to be in when you click the window
end
Report Abuse
HiTechTroller is not online. HiTechTroller
Joined: 31 Jul 2012
Total Posts: 15163
25 Jul 2016 08:31 AM
idk


Welcome to ATR, may I take your order? https://www.roblox.com/ITS-JUST-A-PRANK-BRO-item?id=318480818
Report Abuse
cornholio234 is not online. cornholio234
Joined: 22 Oct 2010
Total Posts: 15142
25 Jul 2016 08:35 AM
I wouldn't see why that wouldn't work for what you're going for
Report Abuse
SpinBoat8872 is not online. SpinBoat8872
Joined: 03 Feb 2016
Total Posts: 9337
25 Jul 2016 08:37 AM
idk i dont script

Add 5k posts (previously SpinBoat)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » All Things ROBLOX
   
 
   
  • 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