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 » Scripters
Home Search
 

CFrame Issue

Previous Thread :: Next Thread 
Darsnic is not online. Darsnic
Joined: 02 Jan 2012
Total Posts: 198
22 Jan 2017 06:31 PM
I'm trying to make a vault door, but it's rotation is -90 degrees, I tried using CFrame.Angles as suggested but it didn't actually work, and now I once again need help.

Script:

local Door = game.Workspace.Door
local PartE = game.Workspace.PartE
local debounce = false
local originalCF = Door.CFrame
local newCF = originalCF * CFrame.Angles(0,math.rad(90),0)

game.Workspace.PartE.ClickDetector.MouseClick:Connect(function()
if not debounce then
debounce = true
game.Workspace.PartO.BrickColor = BrickColor.New("Lime green")
game.Workspace.Door.Sound3:Play()
wait(0.1)
game.Workspace.PartO.BrickColor = BrickColor.New("Mid gray")
wait(0.1)
game.Workspace.PartO.BrickColor = BrickColor.New("Lime green")
game.Workspace.Door.Sound3:Play()
wait(0.1)
game.Workspace.PartO.BrickColor = BrickColor.New("Mid gray")
wait(0.1)
game.Workspace.PartO.BrickColor = BrickColor.New("Lime green")
game.Workspace.Door.Sound3:Play()
wait(0.1)
game.Workspace.PartO.BrickColor = BrickColor.New("Mid gray")
wait(0)
game.Workspace.Door.Sound:Play()
wait(2.7)
Door.CFrame = CFrame.new(-36.6, 3, -71.5)
newCF = originalCF * CFrame.Angles(0,math.rad(-90),0)
wait(0.01)
[Insert CFrames and newCF since I'm trash and don't use loops]
wait(3)
game.Workspace.PartO.BrickColor = BrickColor.New("Really red")
game.Workspace.Door.Sound4:Play()
wait(0.7)
game.Workspace.PartO.BrickColor = BrickColor.New("Mid gray")
game.Workspace.Door.Sound2:Play()
Door.CFrame = CFrame.new(-41.2, 3, -71.5)
newCF = originalCF * CFrame.Angles(0,math.rad(-90),0)
wait(0.01)
[Insert CFrames and newCF since I'm trash and don't use loops]
wait(0)
debounce = false
end
end)



I await a reply.
Report Abuse
Darsnic is not online. Darsnic
Joined: 02 Jan 2012
Total Posts: 198
22 Jan 2017 07:58 PM
b1
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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