|
| 28 Jun 2016 04:17 PM |
so i have an on button. i also have a door set up with a body position so when i click the on button, it slides in the wall taking the place of an uncancollideable door. it didnt work though. My script is below. can someone tell me how to fix it please?
local bodyposone = game.Workspace.DoorMechanic.Moving.BodyPosition local door = game.Workspace.DoorMechanic.Moving.Script local finish = game.Workspace.DoorMechanic.finish
function onClicked(on) bodyposone.Position = finish.Position end
game.Workspace.DoorMechanic.OnButton.ClickDetector.MouseClick:connect(on)
p.s., i am a complete noob at scripting. |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2016 04:22 PM |
any output? what happens when you click on the button? |
|
|
| Report Abuse |
|
|
AxonMega
|
  |
| Joined: 29 Aug 2014 |
| Total Posts: 2403 |
|
|
| 28 Jun 2016 04:26 PM |
| First of all, instead of using game.Workspace.DoorMechanic.Etc, use script.Parent.Etc. script is a core variable in every script referring to itself. |
|
|
| Report Abuse |
|
|