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 add custom animations?

Previous Thread :: Next Thread 
halotrooper117 is not online. halotrooper117
Joined: 30 May 2009
Total Posts: 1696
28 Jan 2014 10:50 AM
I've made a number of custom action animations, and was hoping someone could tell me how I can put them like the Roblox actions, so that you perform them by saying, "/e [animation name".

Does anyone here have any experience with that?
Report Abuse
EcIiptic is not online. EcIiptic
Joined: 12 Aug 2009
Total Posts: 13737
28 Jan 2014 10:59 AM
Chat(msg, plyr)
if msg:sub(3) == "Jump" then
--code here for jump animation
elseif msg:sub(3) == "Walk" then
--code here for walk animation
end
end

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(message)
if message:sub(1,2) == "/e" then
Chat(message, player)
end
end)
end)
Report Abuse
halotrooper117 is not online. halotrooper117
Joined: 30 May 2009
Total Posts: 1696
28 Jan 2014 11:10 AM
1. Do I just put that in workspace, I take it?

2. I can copy/paste that last section as many times as needed without issues, correct?
Report Abuse
EcIiptic is not online. EcIiptic
Joined: 12 Aug 2009
Total Posts: 13737
28 Jan 2014 11:16 AM
Use this instead, it's easier.

Place this script in workspace, then use your brain to figure out the rest. :)





InitiationPhrase = "e/"
Length = string.InitiationPhrase:len()

Chat(msg, plyr)
local Message = msg:lower()
local Player = plyr
if Message:sub(Length + 1) == "jump" then
--code here for jump animation

elseif Message:sub(Length + 1) == "walk" then
--code here for walk animation

end
end

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(message)
if message:sub(1, Lenth) == InitiationPhrase then
Chat(message, player)
end
end)
end)
Report Abuse
EcIiptic is not online. EcIiptic
Joined: 12 Aug 2009
Total Posts: 13737
28 Jan 2014 11:17 AM
InitiationPhrase = "e/"
Length = string.InitiationPhrase:len()

Chat(msg, plyr)
local Message = msg:lower()
local Player = plyr
if Message:sub(Length + 1) == "jump" then
--code here for jump animation

elseif Message:sub(Length + 1) == "walk" then
--code here for walk animation

end
end

game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(message)
if message:sub(1, Length) == InitiationPhrase then --Misspelled Length, sorry :P
Chat(message, player)
end
end)
end)
Report Abuse
BEART12 is not online. BEART12
Joined: 22 Oct 2008
Total Posts: 3190
28 Jan 2014 11:17 AM
@OOP

How did you make animations?
Report Abuse
halotrooper117 is not online. halotrooper117
Joined: 30 May 2009
Total Posts: 1696
28 Jan 2014 11:18 AM
Well, I suppose my brain has gotten me this far, so...

Thanks, at any rate. If I'm using the default walk and jump animations, what do I do? Just remove those sections?
Report Abuse
halotrooper117 is not online. halotrooper117
Joined: 30 May 2009
Total Posts: 1696
28 Jan 2014 11:21 AM
http://www.roblox.com/Roblox-Animation-plugin-item?id=142327236

Add an animation dummy from free models and select the plug in, then click it. It takes a bit of time to learn, but it's fairly easy once you get the hang of it.
Report Abuse
halotrooper117 is not online. halotrooper117
Joined: 30 May 2009
Total Posts: 1696
28 Jan 2014 11:35 AM
Alright- the one thing that's been giving me issues:

How do I actually implement my custom animations into the script? Do I put the actions as animations or as stringvalues? Where do I then put those, in the workspace or in the script like the roblox animations are?
Report Abuse
EcIiptic is not online. EcIiptic
Joined: 12 Aug 2009
Total Posts: 13737
28 Jan 2014 12:04 PM
Your on your own with that one.

All I did was give you a function that fires when someone says "e/ jump" or "e/ walk"

You can add more elseif's for more animation's, and change the stringvalue of "jump" to something else if you want the person to say something else for it to fire.

But I don't know the first thing about making animations.
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