Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do I make like two pressure plate and when a certain two blocks hit them they open a door?

Asked by 3 years ago

I wanted to make two blocks when both of them are on the two platform (part) they will open a door and they can only open the door if they are on together. I tried an if statement, it didn't work. So please could some one help me. I have deleted all the script that i made so could someone tried to help me and make a script or help me in some way

1 answer

Log in to vote
1
Answered by
sayer80 457 Moderation Voter
3 years ago
Edited 3 years ago

You have to make a .Touch function that will turn a value for example:

Part1isonbutton = true

and when the part is the other Part then

Part2isonbutton = true

and then check if both values are true in the same function and if so then the button moves/tweens down and the door opens.

and when .TouchedEnded happens then the part who stopped touching goes liek Part1isonbutton = false and then check if the other one is true then move the button up again and close door

1
Ayo perfect explanation! Nitrolux200 62 — 3y
0
ok so should i need to set a value on a the block when it is hit? superbestguy567 0 — 3y
0
Yeah a value for eachblock and then unset the value after touchended sayer80 457 — 3y
Ad

Answer this question