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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|
|
| 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
|
  |
| Joined: 17 Jul 2010 |
| Total Posts: 7079 |
|
| |
|
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
|
  |
| 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
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
|
| 17 Dec 2014 12:42 PM |
| With a for loop or bodyPosition dude |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 29 Jul 2014 |
| Total Posts: 13268 |
|
| |
|