generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: I need help.

Previous Thread :: Next Thread 
HorrifyingInstance is not online. HorrifyingInstance
Joined: 10 Jul 2013
Total Posts: 568
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
juzzbyXfalcon is not online. juzzbyXfalcon
Joined: 02 Feb 2011
Total Posts: 1311
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
HorrifyingInstance is not online. HorrifyingInstance
Joined: 10 Jul 2013
Total Posts: 568
13 Jul 2013 07:42 AM
Didn't work :|
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
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
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
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
HorrifyingInstance is not online. HorrifyingInstance
Joined: 10 Jul 2013
Total Posts: 568
13 Jul 2013 09:36 AM
Still doesn't work, sorry.
Report Abuse
smiley599 is not online. 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
Unsubstantial is not online. Unsubstantial
Joined: 11 Sep 2012
Total Posts: 872
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
Unsubstantial is not online. Unsubstantial
Joined: 11 Sep 2012
Total Posts: 872
13 Jul 2013 09:41 AM
@my post, ignore it sorry. Didn't read it properly.
Report Abuse
smiley599 is not online. 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
HorrifyingInstance is not online. HorrifyingInstance
Joined: 10 Jul 2013
Total Posts: 568
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 is not online. 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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
13 Jul 2013 11:41 AM
You are all comparing Vector3s with CFrames.
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
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 is not online. 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
HorrifyingInstance is not online. HorrifyingInstance
Joined: 10 Jul 2013
Total Posts: 568
13 Jul 2013 11:51 AM
That's not the issue.
Don't worry, I fixed it. :)

~HorrifyingInstance~
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
13 Jul 2013 11:52 AM
@cheat

You're setting the Position to a CFrame.
Report Abuse
smiley599 is not online. 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
HorrifyingInstance is not online. HorrifyingInstance
Joined: 10 Jul 2013
Total Posts: 568
13 Jul 2013 12:01 PM
@cheatmaster18, thank you.
But I have another script that I have made.
It works better. :)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image