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: Why won't this repeat work?

Previous Thread :: Next Thread 
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
03 Mar 2012 03:18 PM
repeat wait() script.Parent.Parent.Door.CFrame = script.Parent.Parent.Door.CFrame * CFrame.Angles(0,0,0.1) until script.Parent.Parent.Door.CFrame >= CFrame.Angles(0,0,1)

Output: Workspace.Diamond Door.Buttons.Script:5: attempt to compare two userdata values
(KEEP IN MIND THIS IS THE BROKEN LINE I'M POSTING)
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
03 Mar 2012 03:21 PM
Full script:


for i,v in pairs(script.Parent.Parent.Fillers:GetChildren()) do
if v then v.Transparency = 1
end
end
repeat wait() script.Parent.Parent.Door.CFrame = script.Parent.Parent.Door.CFrame * CFrame.Angles(0,0,0.1) until script.Parent.Parent.Door.CFrame >= CFrame.Angles(0,0,1)
repeat wait() script.Parent.Parent.Door.CFrame = script.Parent.Parent.Door.CFrame * CFrame.new(0,1,0) until script.Parent.Parent.Door.CFrame >= CFrame.new(-8.553, 20.4, 1)
repeat wait() script.Parent.Parent.Door.CFrame = script.Parent.Parent.Door.CFrame * CFrame.new(0,0.1,0) until script.Parent.Parent.Door.CFrame >= CFrame.new(-8.553, 21.86, 1)
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
03 Mar 2012 03:21 PM
repeat wait() script.Parent.Parent.Door.CFrame = script.Parent.Parent.Door.CFrame * CFrame.Angles(0,0,0.1) until script.Parent.Parent.Door.CFrame:toEulerAnglesXYZ() ​>= CFrame.Angles(0,0,1)

he who has an itchy bum at night wakes up with a smelly finger in the morning. ~Confucius
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
03 Mar 2012 03:23 PM
Why do you want me to use EulerAngles?
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
03 Mar 2012 03:23 PM
because it returns the angle of the CFrame, and your comparing it to an angle right?

he who has an itchy bum at night wakes up with a smelly finger in the morning. ~Confucius
Report Abuse
grimm343 is not online. grimm343
Joined: 18 Sep 2008
Total Posts: 2796
03 Mar 2012 03:24 PM
script.Parent.Parent.Door.CFrame >= CFrame.Angles(0,0,1)

That's comparing like...

CFrame.new(50,12,30) with CFrame.Angles(0,0,1)
CFrame.Angles is just a constructor for a CFrame, anyway..

How could you compare Vector3.new(60,20,-17) with Vector3.new(-4,30,72)
Report Abuse
flappydavid is not online. flappydavid
Joined: 03 May 2009
Total Posts: 5893
03 Mar 2012 03:25 PM
New output:

16:25:02 - Workspace.Diamond Door.Buttons.Script:5: attempt to compare userdata with number
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
03 Mar 2012 03:25 PM
would you like some butter with your late toast?

he who has an itchy bum at night wakes up with a smelly finger in the morning. ~Confucius
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
03 Mar 2012 03:26 PM
flappy, i'll run some tests for you :)

he who has an itchy bum at night wakes up with a smelly finger in the morning. ~Confucius
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
03 Mar 2012 03:29 PM
repeat wait() script.Parent.Parent.Door.CFrame = script.Parent.Parent.Door.CFrame * CFrame.Angles(0,0,0.1) until script.Parent.Parent.Door.CFrame:toEulerAnglesXYZ() ​>= CFrame.Angles(0,0,1):toEulerAnglesXYZ()

he who has an itchy bum at night wakes up with a smelly finger in the morning. ~Confucius
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