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

How can I make a pressure plate?

Asked by 5 years ago
Edited 5 years ago

I know how to do 'onTouch' and all that. What I am really unsure about is what to do when the player steps off the pressure plate before it is activated.

For example: Say the pressure plate opens a door if someone stands on it for 3 seconds. What if the person stands on the plate for 2 seconds, then jumps off? How can I code for the door activation to be stopped?

I also have another question: How can I detect how many players are standing on the pressure plate? I want the time it takes for the door to be activated to half (to 1.5 seconds) when 2 people stand on the pressure plate.

Many thanks!

0
might wanna do a region3 instead of touched Vulkarin 581 — 5y
1
The touched event only fires when a part first touches it (or moves on top of it). Like Vulkarin said above; use region3, as it's a bit more fitting to what you are asking the pressure plate to do. exxtremestuffs 380 — 5y

Answer this question