|
| 13 Aug 2014 11:28 PM |
So I'm making a Sliding Gate triggered by a Surface Gui and I get attempt to call field 'Position' (a user data value)
My Script(that I'm willing to share):
ComputerToDoors = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Doors function onClicked() if ComputerToDoors.CCdoor.Left.Position(-77, 28.9, 123.5) == true then -- The Error showed up when I added this!
script stuff(nothing wrong with this part) script stuff(nothing wrong with this part) script stuff(nothing wrong with this part) script stuff(nothing wrong with this part)
script.Parent.MouseButton1Click:connect(onClicked)
I'd much appreciate it if you could tell me how to fix this error.
|
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 13 Aug 2014 11:31 PM |
ComputerToDoors.CCdoor.Left.Position(-77, 28.9, 123.5) == true
...What is that line even supposed to do? If it's supposed to check whether the position is the value in parenthesis, that's not how to do it.
ComputerToDoors.CCdoor.Left.Position == Vector3.new(-77, 28.9, 123.5)
Is closer. |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2014 11:37 PM |
| I was making it so that the door doesn't reopen if you click the green button twice. I would press the green button and the door would just close instantly and reopen.. |
|
|
| Report Abuse |
|
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 13 Aug 2014 11:39 PM |
Why not just have an Open variable that stores whether the door is open or closed?
At the moment if you move the door at all the script will break. |
|
|
| Report Abuse |
|
|
|
| 13 Aug 2014 11:48 PM |
cuz i sed so
cuz i sed so
cuz i sed so
cuz i sed so..
..m8 |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2014 12:05 AM |
| it would only be one = sign, not two. two is for comparison. |
|
|
| Report Abuse |
|
|