Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I script it so animations are in someones inventory?

Asked by 6 years ago

I need to know how to script animations into a person's inventory for my dance group please help!

0
What have you tried so far? This question isn't very specific because there's more than one way to make anything and I'm not really sure what you want to be made. Scripting Helpers is a place to help people fix problems with their code or lead them in the right direction to solve problems themselves, but if you haven't tried to make something there's not very much we can do. vanilla_wizard 336 — 6y
0
I've been having a hard time with this scripting, a lot of my tries I have failed MISERABLY. I just wanted some script ideas from others. goldenpatterns 0 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

1- You could create a button using the GUI system that plays an animation when a button is clicked. 2- You could create a tool that is placed in the user's inventory and causes the player to dance when the tool is "activated". You could even use the UserInputService that makes a player dance when a certain key is pressed. You would need to start off by creating the dance animation using Roblox's animation plugin (I suggest downloading a better plugin though because the new animation UI isn't as flexible as it's former self). You seem to be a beginner so I would suggest doing what most of us around here have done -- watch videos on YouTube, read the Roblox Wiki, dissect scripts written by other players, etc. People around here don't just hand you the solution for you to copy/paste. You're trying to accomplish something a bit more advanced but I know that you'll figure it out for sure!

Ad
Log in to vote
0
Answered by 6 years ago

Your going to want to make a tool, inside that tool make a LocalScript

Make sure to store animations in ServerStorage

Make sure to create a RemoteEvent in ReplicatedStorage

LocalScript inside Tool

script.Parent.Activated:connect(function()
    game.RepliactedStorage.Dance:FireServer("Dance Name") -- Fires Server Event and gives a Dance name
end)

Script inside ServerScriptService

game.RepliactedStorage.Dance.OnServerEvent:connect(function(player,dance)
    local animation = player.Character:LoadAnimation(game.ServerStorage[dance]) -- Loads a dance animation from given dance name from the Fired Event
    animation:Play()
end)
0
I have a question do I do both in one script? goldenpatterns 0 — 6y
0
No you would create a LocalScript inside a tool with the first code, then inside the ServerScriptService you would create a script with the second code TangoSen 22 — 6y

Answer this question