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: What's wrong with this script?

Previous Thread :: Next Thread 
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
08 Aug 2017 04:29 PM
It's not playing the animation: local anim = Instance.new("Animation") anim.AnimationId = ######################################### script.Parent.Equipped:connect(function(mouse) local playAnim = humanoid:LoadAnimation(anim) playAnim:Play() end)
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
08 Aug 2017 04:30 PM
local anim = Instance.new("Animation")
anim.AnimationId = "(Hashtags)"

script.Parent.Equipped:connect(function(mouse)
local playAnim = humanoid:LoadAnimation(anim)
playAnim:Play()
end)
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
08 Aug 2017 04:42 PM
and something went B U M P in the night.
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
08 Aug 2017 04:49 PM
It's for playing an animation when a tool is equipped.
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
08 Aug 2017 04:50 PM
is there an error in the output? do you own the animation and are you using it in your own place?
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
08 Aug 2017 04:51 PM
I don't think there's any error output. Yes I own the place, and I'm using the equip animation from the swordpunch gear.
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
08 Aug 2017 04:56 PM
buuuuuump
Report Abuse
HeIix is not online. HeIix
Joined: 19 Jan 2013
Total Posts: 253
08 Aug 2017 04:57 PM
What's the priority?


‍ ‍ ‍                                            ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
08 Aug 2017 04:59 PM
Priority?
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
08 Aug 2017 05:12 PM
Hello?
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
08 Aug 2017 05:15 PM
wiki.roblox.com/index.php?title=API:Enum/AnimationPriority
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
09 Aug 2017 06:59 PM
There is no priority because it fetches the animation from the website and plays it. I couldn't find any script that would play the animation that I put in the tool upon equipping.
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
09 Aug 2017 07:01 PM
oh I see it's an enum to put in the script, but I'm not very good at scripting so I'm confused.
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
09 Aug 2017 07:10 PM
Oh sorry there is an error output

It says "Unknown Global: Humanoid"
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
09 Aug 2017 07:20 PM
ayy lmao
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
09 Aug 2017 07:28 PM
Dude how hard could it be, I just want a tool to play an animation when equipped. I'll pay one of you if you want.
Report Abuse
SpartanJohn_117 is not online. SpartanJohn_117
Joined: 07 Feb 2010
Total Posts: 1721
09 Aug 2017 07:32 PM
--{{Variables}}--
Player = game.Players.LocalPlayer
repeat wait() until Player.Character ~= nil
Character = Player.Character
Tool = script.Parent
Animation = Tool.Animation

--//Script\\--
function onEquip() --When you equip
Animate = Character.Humanoid:LoadAnimation(Animation) --Loads the animation
wait() --Waits for the animation to load
Animate:Play() --Plays the animation
end --Ends the function

function unEquip() --When you unequip
Animate:Stop() --Stops the animation
end --Ends the function

--%%Functions%%--
script.Parent.Equipped:connect(onEquip) --Connects the onEquip function when you equip
script.Parent.Unequipped:connect(unEquip) --Connects the unEquip function when you unequip
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