|
| 13 Jul 2013 07:12 AM |
door = workspace.EntranceDoor function open() repeat door.Position = Position - CFrame.new(0, 0.2, 0) wait(0.2) until door.Position(-38.5, -1.8, -30) end
script.Parent.MouseButton1Down:connect(door)
I don't see what's wrong with it! Can anyone help? I'm sort of new to scripting Gui's.
Thanks again, ~HorrifyingInstance~ |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2013 07:15 AM |
Should probably be
door = workspace.EntranceDoor function open() repeat door.Position = Position - CFrame.new(0, 0.2, 0) wait(0.2) until door.Position = CFrame.new(-38.5, -1.8, -30) end
script.Parent.MouseButton1Down:connect(open)
Haven't done cframe in a while though, let me know if it works.
-Believe and you will achieve- |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Jul 2013 07:57 AM |
door = workspace.EntranceDoor function open() repeat door.Position = CFrame.new(0, 0.2, 0) - door.Position wait(0.2) until door.Position = CFrame.new(-38.5, -1.8, -30) end
script.Parent.MouseButton1Down:connect(open) |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2013 07:58 AM |
ops forgot something, here is an correction:
door = workspace.EntranceDoor function open() repeat door.Position = CFrame.new(0, 0.2, 0) - door.Position wait(0.2) until door.Position == CFrame.new(-38.5, -1.8, -30) end
script.Parent.MouseButton1Down:connect(open) |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2013 09:36 AM |
| Still doesn't work, sorry. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 13 Jul 2013 09:39 AM |
This will work:
door = workspace.EntranceDoor
repeat door.CFrame = door.CFrame - Vector3.new(0, 0.2, 0) wait(0.2) until door.CFrame = Vector3.new(-38.5, -1.8, -30) end |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2013 09:40 AM |
door = workspace.EntranceDoor function open() repeat door.Position = CFrame.new(0, 0.2, 0) - door.Position repeat wait(0.2) until door.Position == CFrame.new(-38.5, -1.8, -30) end
script.Parent.MouseButton1Down:connect(open) |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2013 09:41 AM |
| @my post, ignore it sorry. Didn't read it properly. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 13 Jul 2013 09:43 AM |
Here:
This will work:
door = workspace.EntranceDoor
function name() repeat door.CFrame = door.CFrame - Vector3.new(0, 0.2, 0) wait(0.2) until door.CFrame = Vector3.new(-38.5, -1.8, -30) end
--put connection line here |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2013 10:50 AM |
Yup, none of these work. I'll just wait until I am done learning Lua, which shall be a while. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 13 Jul 2013 11:38 AM |
You're not helping us, what is the output?
Scripting Tutorials: youtube.com/user/smiley599roblox |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2013 11:41 AM |
| You are all comparing Vector3s with CFrames. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2013 11:41 AM |
Ops, I forgot to correct one more thing, here is an correction (hope this one works):
door = workspace.EntranceDoor function open() repeat door.Position = CFrame.new(0, 0.2, 0) - door.Position wait(0.2) until door.Position == Vector3.new(-38.5, -1.8, -30) end
script.Parent.MouseButton1Down:connect(open) |
|
|
| Report Abuse |
|
|
100465
|
  |
| Joined: 17 Jun 2010 |
| Total Posts: 6353 |
|
|
| 13 Jul 2013 11:44 AM |
Try capitalizing Workspace?
Thats all i can see.
Im not random, my mind just works faster than yours. |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2013 11:51 AM |
That's not the issue. Don't worry, I fixed it. :)
~HorrifyingInstance~ |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2013 11:52 AM |
@cheat
You're setting the Position to a CFrame. |
|
|
| Report Abuse |
|
|
smiley599
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 13 Jul 2013 11:53 AM |
@100456
workspace can be capitalised, or non-capitalized; same for game.
Scripting Tutorials: youtube.com/user/smiley599roblox |
|
|
| Report Abuse |
|
|
|
| 13 Jul 2013 12:01 PM |
@cheatmaster18, thank you. But I have another script that I have made. It works better. :) |
|
|
| Report Abuse |
|
|