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: A little position help,

Previous Thread :: Next Thread 
harvest109 is not online. harvest109
Joined: 19 Jun 2011
Total Posts: 869
30 Jun 2014 06:57 AM
while script.Parent.Position ~= Vector3.new(17.218, 4.615, -27.377) do --check that
script.Parent.CFrame=script.Parent.CFrame*CFrame.new(0.2,0,0)
wait()
end
while true do wait(0.1)
print'Checking'
if script.Parent.Position ~= script.Parent.Parent.DoorStop.Position then
print'Stoped'
script.Parent.DoorOpen.Open.Value = true
end
end


Well I am trying ot make it so when the "door" moves to the defined position it will stop,

here is the model, much easier,

Local script in starter gui and door in workspace.

http://www.roblox.com/SH-item?id=163931688

Please help.
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
30 Jun 2014 06:59 AM
"while script.Parent.Position ~= Vector3.new(17.218, 4.615, -27.377) do"

I'd recommend doing

while true do
if script.Parent.Position ~= Vector3.new(17.218, 4.615, -27.377) then


from past experience
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
30 Jun 2014 07:02 AM
Why don't you just make a set loop to close the door?
Getting two positions to line up is unreliable and inefficient.
Report Abuse
harvest109 is not online. harvest109
Joined: 19 Jun 2011
Total Posts: 869
30 Jun 2014 07:05 AM
Just moves like 1 inch then stops,
Report Abuse
harvest109 is not online. harvest109
Joined: 19 Jun 2011
Total Posts: 869
30 Jun 2014 07:06 AM
And how would I do that, great wizard?
Report Abuse
harvest109 is not online. harvest109
Joined: 19 Jun 2011
Total Posts: 869
30 Jun 2014 07:13 AM
Wizard, and your magic pumkin.
Report Abuse
harvest109 is not online. harvest109
Joined: 19 Jun 2011
Total Posts: 869
30 Jun 2014 07:38 AM
Surry buttt bemp1
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
30 Jun 2014 07:43 AM
You're going to have to change things to get the door to move how far you want it to.

for i = 1,10 do
script.Parent.CFrame=script.Parent.CFrame*CFrame.new(0.2,0,0)
wait()
end

for i = 1,10 do
script.Parent.CFrame=script.Parent.CFrame*CFrame.new(-0.2,0,0)
wait()
end
Report Abuse
harvest109 is not online. harvest109
Joined: 19 Jun 2011
Total Posts: 869
30 Jun 2014 09:13 AM
! THANK YOU!!!!! BLESS YOU *Muwah* *muwah*
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