I would like to connect one button to 8 bricks, I need these bricks to be cancollide when the button is enabled and uncancollide when the button is unenabled. I was wondering if this was an easy script? If not could someone make it and PM me at, Ffbryce1 on my account to get it to me?
Their is a way, to make a button and collide. It's like a door and admin script when you put the player name, like this : "Door1", "Door2" , "Door3" You can try on your own, if you can.
See I dont know how to script but I know it would be like if Button disabled = ("door1","door2") collide
and opposite with other? Could someone type up the script and slap it in the comments if its that easy?
Script:
01 | local opening = false |
02 | local function onTouched(hit) |
03 | if opening = = true then return end -- don't do anything if it is already opening |
04 | if opening = = false then |
05 | opening = true |
06 | print ( "Brick was touched" ) -- optional |
07 | script.Parent.Parent.Part 1. Transparency = 1 -- make it transparent, but it's optional |
08 | script.Parent.Parent.Part 1. CanCollide = false |
09 | script.Parent.Parent.Part 2. Transparency = 1 |
10 | script.Parent.Parent.Part 2. CanCollide = false |
11 | script.Parent.Parent.Part 3. Transparency = 1 |
12 | script.Parent.Parent.Part 3. CanCollide = false |
13 | script.Parent.Parent.Part 4. Transparency = 1 |
14 | script.Parent.Parent.Part 4. CanCollide = false |
15 | script.Parent.Parent.Part 5. Transparency = 1 |
Hope I helped. This took a while to write out. Tell me if there's an error.