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: Multi Brick Door

Previous Thread :: Next Thread 
DarkLordKilla85 is not online. DarkLordKilla85
Joined: 15 Aug 2013
Total Posts: 87
27 Nov 2013 03:43 AM
My door contains more then "One Brick". I've had to make it into a "Model". Is there a way to make this door clickable even though it's made out of multiple of bricks??

I did try this script out but assuming this only works for one brick?

local cf = script.Parent.CFrame

function onClicked()
if script.IsOpened.Value == false and script.IsOpening.Value == false then
script.IsOpening.Value = true
for i = 1,16 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, -0.18) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
end
script.IsOpening.Value = false
script.IsOpened.Value = true
elseif script.IsOpened.Value == true and script.IsOpening.Value == false then
script.IsOpening.Value = true
for i = 1,16 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.1, 0) * CFrame.new(0, 0, 0.18)
wait(0.01)
end
script.IsOpening.Value = false
script.IsOpened.Value = false
script.Parent.CFrame = cf
script.CloseSound:Play()
end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

This script does work but I need it to work for a "Model". which contains more than one brick.

-Ash
Report Abuse
anotheraltyetagain is not online. anotheraltyetagain
Joined: 26 Nov 2013
Total Posts: 31
27 Nov 2013 03:59 AM
Put the bricks in a model and do the door part of the script in a generic for.
Report Abuse
DarkLordKilla85 is not online. DarkLordKilla85
Joined: 15 Aug 2013
Total Posts: 87
27 Nov 2013 05:41 AM
Could you explain more?:)

I'm not a scripter so I don't know half of this stuff.. I'm only on here to build and be creative.

-Ash
Report Abuse
DarkLordKilla85 is not online. DarkLordKilla85
Joined: 15 Aug 2013
Total Posts: 87
27 Nov 2013 01:48 PM
Anymore suggestions or guidance?:)

-Ash
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