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
 

Re: How2do (easy because im dumb for the time being)

Previous Thread :: Next Thread 
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 11:52 AM
Mode = "afk"

while Mode == "afk" do
game.Workspace.Part.CFrame = game.Workspace.Part.CFrame * CFrame.Angles(0,WhatToAdd,0)
end




So while Mode is afk, the part needs to ALWAYS move smoothly up and down.

"Smoothly up and down"

What's a good way to do this? I can think of some but it's just un-needed ways.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Dec 2014 12:22 PM
You could use my tweening library with InOutQuad, but I don't have support for CFrame (Only V3Pos) because I was too lazy to add it.

Take a look at my tweening library and at the PlainValue tween. See if you can get that for your 'WhatToAdd'
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 12:26 PM
Yeah but like

It needs to go back and forth, smoothly. What's the way you would use? Manipulate the for loop which everyone told me was crappy to do, or?? Can't think of other ways..Of course theres a glitchy coroutine thing...but we dont speak of that
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
17 Dec 2014 12:26 PM
local Mode = 'afk' --local makes it accessible faster

while Mode == 'afk' do
wait() --really important!!! wen u do a loop without a wait() or any other yielding method ur Game will crash!
game.Workspace.Part.CFrame = game.Workspace.Part.CFrame * CFrame.Angles(0,WhatToAdd,0)
end

but for smoothly

local Mode = 'afk'
local Run = game:GetService('RunService') --with this we can wait a lot less!

for i = 1, 10 do --u can do some other number if u want to replace 10 (the number of WhatToAdd should actually be in there)
Run:wait() --now that we have the Run:wait() instead of the normal wait() it can go faster!
game.Workspace.Part.CFrame = game.Workspace.Part.CFrame * CFrame.Angles(0,i,0)
end
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 12:27 PM
^ dude no. dont reply
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
17 Dec 2014 12:27 PM
oops, forgot...

for i = 1, 10 do
if Mode == 'afk' then
Run:wait()
game.Workspace.Part.CFrame = game.Workspace.Part.CFrame * CFrame.Angles(0,i,0)
end
end
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 12:29 PM
bro
no
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Dec 2014 12:32 PM
You mean like, without the sharp stopping starting at the edges of the loops?
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 12:36 PM
I just don't know how I do this

---SMOOTHLY---
Up
down <-- The brick goes like this, begins on top, then down, then back up.
up


How would you SCRIPT this?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Dec 2014 12:42 PM
With a for loop or bodyPosition dude
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 12:43 PM
then show me
I can't use bodyposition
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 12:45 PM
Seriously

Why tell me to use a loop? This thread is about loops.

I just don't know how I'd make it go, down up again.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Dec 2014 12:51 PM
Like,

local i = 0;
while true do
while i<10 do
i=i+wait() -- Because deltatime
thatThing.CFrame = CFrame.new(Xpos,i,Zpos);
end
while i>0 do
i=i-wait()
thatThing.CFrame = CFrame.new(Xpos,i,Zpos);
end
end


Not 'smooth' but yeah
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 01:00 PM
Like what I am doing, I am making an animation and the arms needs to move abit up and down. Here is the line where I need to loop it

C1 = CFrame.new(.5,.5,0) * CFrame.Angles(0,math.rad(90),0):toObjectSpace() * CFrame.Angles(0,0,math.rad(90)):toObjectSpace(),



In the last CFrame.Angles on the math.rad(90)

It needs to be 85, then smoothly become into 95 then goes back to 85 and so on.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 01:18 PM
@eLunate, you method didn't make it smooth and FAR by fast. Very slow, I increased it but then I noticed it wasn't smooth. I need other metods. e.e. It starts from down, up, down, up down FOREVER.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Dec 2014 01:24 PM
Personal opinion? I think you're lazy and stupid. I really do. I'm not up for this kind of silly right now.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 01:27 PM
Stop being so arrogant and comming with false claims.

Define how I'm lazy, define stupid.

You're just getting annoying when you come with crap like this.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Dec 2014 01:34 PM
I have given you an example and told you to look at my tween library, which yoy have used neither and so your problem still stands.
If you mean smooth like I asked (Speeding up and slowing down at the ends of the loop) yhen you should have said so when I asked.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 01:36 PM
"an example" what the hell? And I gave you reply on how idiotic that one worked?

And the problem isn't getting it smooth, it's about the way I create functionality where it wants to go down again after I move it up.


...

Which is why the tweening isn't needed.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 01:59 PM
Nvm, for loops wasn't so bad after all. (Everyone told me it was crappy and to use while loops lel)
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Dec 2014 03:57 PM
Things aren't going to always be smooth just because you want them to be dude.
Report Abuse
Fedorakid is not online. Fedorakid
Joined: 17 Jul 2010
Total Posts: 7079
17 Dec 2014 03:59 PM
I got it working by using my own method, I don't need to hear complaints from you especially when it is false accusations.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
17 Dec 2014 04:01 PM
(Wonderful)
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