|
| 08 Mar 2015 03:08 PM |
When you click as switch, its suppose to open the door The problem is that it doesnt do it.
It lets me click the button, but nothing happens, no output
-- variables and loops though different doors elseif v.Name=='Lever' or v.Name=='Button' then local open=false local opening=false local door=ob:FindFirstChild('Door') local normSize=door.Size local normPos=door.CFrame if door then local clicker=storage.Clicker:Clone() clicker.Parent=v clicker.MouseClick:connect(function(player) if not opening then opening=true if open then door.Transparency=0 for i=normSize.X/move,0,-1 do door.Size=normSize+Vector3.new(-move*i,0,0) door.CFrame=normPos*CFrame.new(-(move/2)*i,0,0) if v.Name=='Lever' then v.CFrame=v.CFrame*CFrame.new(0,-1.8/normSize.X*move,0) end wait(.05) end open=false else for i=0,normSize.X/move do door.Size=normSize+Vector3.new(-move*i,0,0) door.CFrame=normPos*CFrame.new(-(move/2)*i,0,0) if v.Name=='Lever' then v.CFrame=v.CFrame*CFrame.new(0,1.8/normSize.X*move,0) end wait(.05) end door.Transparency=1 open=true end opening=false end end) end end |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 03:52 PM |
| Its a script that opens a door when you click a click detector that I put inside the switch |
|
|
| Report Abuse |
|
|
| |
|
IIIIIIlII
|
  |
| Joined: 06 Jan 2011 |
| Total Posts: 710 |
|
|
| 08 Mar 2015 04:24 PM |
| I dont see remote events firing... |
|
|
| Report Abuse |
|
|
| |
|
parkiet3
|
  |
| Joined: 16 Jul 2011 |
| Total Posts: 832 |
|
|
| 08 Mar 2015 04:32 PM |
| Still we see no remote events, the server cant detect mouseclicks i guess |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Mar 2015 04:33 PM |
"Still we see no remote events"
its a door in workspace moved by a server script theres no need for them |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
|
| 08 Mar 2015 04:39 PM |
Mouse is local Is it not?
You need a seperate Local Script that detects when the player clicks than fire it with a remote events
Derp. |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 04:43 PM |
local clicker=storage.Clicker:Clone() clicker.Parent=v clicker.MouseClick:connect(function(player)
clicker is a click detector |
|
|
| Report Abuse |
|
|
CrowClaws
|
  |
| Joined: 04 Jul 2010 |
| Total Posts: 4466 |
|
| |
|
|
| 08 Mar 2015 04:46 PM |
| I understand that I was already porting it over I just was making sure you its a click detector. |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 08 Mar 2015 04:54 PM |
| Have you tried debugging? Its a logic error. |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 05:00 PM |
| it works with remote event |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 05:05 PM |
| ClickDetectors don't work with FE. No fix. |
|
|
| Report Abuse |
|
|
|
| 08 Mar 2015 05:06 PM |
| Unless you did it clientside I think. |
|
|
| Report Abuse |
|
|
| |
|