|
| 11 Jan 2017 06:07 PM |
Hi guys, I'm currently working on a Train simulator and I've just started using FindPartsInRegion3. I have a working piece of code for signals that change the light when something is detected inside the Region3:
while wait(1) do for i,v in pairs(game.Workspace:FindPartsInRegion3(region,nil,100)) do if v:findFirstChild("SignalValue") then script.Parent.Signal1.LightPanels.Lights.Red.Visible = true script.Parent.Signal1.LightPanels.Lights.Green.Visible = false end end end
It changes light accordingly when a signal is detected within the Region3, my only problem is, how would I fire an event when the signal has left the Region3? I absolutely have no clue about this part. Can anyone help me out? :P |
|
|
| Report Abuse |
|
|
| 11 Jan 2017 06:08 PM |
if there's no signal in the region 3, then they've left
there's no event as far as i know |
|
|
| Report Abuse |
|