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: How to make animations

Previous Thread :: Next Thread 
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
28 Jun 2013 02:27 PM
I am aware the user animations are locked, so is there another way?
Report Abuse
xSIXx is not online. xSIXx
Joined: 06 Aug 2010
Total Posts: 9202
28 Jun 2013 02:29 PM
keep setting the C1 to a weld with another value?

no one is going to help you here, this subject is like, huge.
Report Abuse
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
28 Jun 2013 02:30 PM
Oh.
Report Abuse
IAmAMelon is not online. IAmAMelon
Joined: 14 Mar 2013
Total Posts: 167
28 Jun 2013 03:16 PM
Interpolating two CFrames are your best options, it's fairly easy to do as well.
Report Abuse
veerstrong is not online. veerstrong
Joined: 23 Jun 2009
Total Posts: 2450
28 Jun 2013 03:17 PM
Like these?

http://www.roblox.com/TestingFreeRunning-place?id=104947889


*Touch the translucent black boxes*
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
28 Jun 2013 03:22 PM
User animations? Use the C0 property of the Motor6D's in the Torso of the Character.
Report Abuse
av83r is online. av83r
Joined: 28 Jul 2009
Total Posts: 2580
28 Jun 2013 03:49 PM
@ six: shut up noob.

the easiest and arguably the best way is welds. you can look up how to do it in the wiki.

you can use math.sin for smooth elliptical movements, running, jumping, climbing, swimming etc.

everything else you want to use something like this:

while true do
wait()
if x ~= tx then
x = cx + (cx2 - cx1) *r
script.Parent.Chest.Weld.C1 = CFrame.new(Vector3.new(0.4,-0.5,0))* CFrame.fromEulerAnglesXYZ(math.rad(x), math.rad(0), math.rad(0))
elseif tx ~= 0 then
cx = 0
cx2 = x


and you can keep adding on to that.

Since you're no novice, I assume you can take it from here.
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
28 Jun 2013 03:55 PM
@above

How is someone supposed to understand code with countless undefined variables in it?
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
28 Jun 2013 04:44 PM
@av83r

Have you actually tried doing that?
Report Abuse
av83r is online. av83r
Joined: 28 Jul 2009
Total Posts: 2580
28 Jun 2013 04:50 PM
@mag: yeah, I've spent countless hours using welds for a lot of things.

basically one variable is the start point and the second one is the ending point, sorry, should have explained that.
Report Abuse
magnalite is not online. magnalite
Joined: 18 Oct 2009
Total Posts: 2467
28 Jun 2013 04:56 PM
@av83r

Doing that is a horrible way of doing things. Its not dynamic at all.
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
28 Jun 2013 05:03 PM
function tweenCFrame(Part, End, Step, Wait, D)
if D == 1 then D = .99 end
local oldPos = Part.CFrame.p
local oldAng = Vector3.new(Part.CFrame:toEulerAnglesXYZ())
local newPos = End.p
local newAng = Vector3.new(End:toEulerAnglesXYZ())
local Co = coroutine.create(function()
i = 0
a = Step
while i <= 1 do
Part.CFrame = CFrame.new((oldPos*(1-i))+(newPos*i))*CFrame.Angles((oldAng.X*(1-i))+(newAng.X*i),(oldAng.Y*(1-i))+(newAng.Y*i),(oldAng.Z*(1-i))+(newAng.Z*i))
i = i + a
a = Step*(1-i*D)
wait()
end
Part.CFrame = End
error()
end)
coroutine.resume(Co)
if Wait then
while coroutine.status(Co) ~= "dead" do
wait()
end
end
end

Hoorah. Sorry it's so hacky, its old. Also, when I made this (using someone elses whose name I forgot as a reference) I used toEulerAnglesXYZ, that should probably be changed. The arguments:
Part - userdata, the part
End - coordinateframe, the final cframe
Step - float, the speed, essentially
Wait - boolean, if you want the script to pause while the animation plays out
D - float 0-1, dampening property
Report Abuse
MHebes is not online. MHebes
Joined: 04 Jan 2013
Total Posts: 2278
28 Jun 2013 05:04 PM
Welds are the same thing, slightly modified.
Report Abuse
av83r is online. av83r
Joined: 28 Jul 2009
Total Posts: 2580
28 Jun 2013 06:25 PM
@mag: and I suppose you have a better way to create a non linear/cyclical motion?
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