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
 

Script edit help?

Previous Thread :: Next Thread 
supersonic300000 is not online. supersonic300000
Joined: 04 Aug 2009
Total Posts: 49
10 Oct 2014 06:36 PM
I need help with my sliding door script.
1.) when ever click the button twice before the door stops moving, it gets pushed even more. I need a line to stop this.

2.)How do I speed up the time for it to get from point A to point B?
Script is
local Debounce = false
function Clicked()

if script.Value.Value == false then
for i = 1,90 do
wait()
script.Parent.Parent.Door.CFrame = script.Parent.Parent.Door.CFrame * CFrame.new(0, 0.1, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
end
script.Value.Value = true
script.Parent.BrickColor = BrickColor.new("Bright red")
else
for i = 1,90 do
wait()
script.Parent.Parent.Door.CFrame = script.Parent.Parent.Door.CFrame * CFrame.new(0, -0.1, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
end
script.Value.Value = false
script.Parent.BrickColor = BrickColor.new("Bright red")
end
end

script.Parent.ClickDetector.MouseClick:connect(Clicked)
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