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
 

CFrame Door Problem!

Previous Thread :: Next Thread 
littelbigblox is not online. littelbigblox
Joined: 29 Aug 2011
Total Posts: 1956
01 Sep 2014 03:05 AM
So ive been making a door with cframe but if i walk and touch the door it goes ontop of my head. I dont know how to stop this.
Script:

ting = 0
local door = script.Parent

function move()
if ting == 0 then
ting = 1
for i =1, 30 do
i = i+1
door.Position = door.Position + Vector3.new(0,0,0.2)
wait(0.1)
end
wait(5)
for i =1, 30 do
i = i+1
door.Position = door.Position + Vector3.new(0,0,-0.2)
wait(0.1)
ting = 0
end
end
end

door.ClickDetector.MouseClick:connect(move)
Report Abuse
CaptainSource is not online. CaptainSource
Joined: 08 Jun 2013
Total Posts: 848
01 Sep 2014 03:29 AM
There should be 2 if statements first one checks its opened other one checks it close or not. you just added one if so it will open then close or close then open
Report Abuse
Subete is not online. Subete
Joined: 10 Jul 2011
Total Posts: 917
01 Sep 2014 03:35 AM
Use CFrame values
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