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

Speed potion: The script will not activate upon clicking! How do I fix this? (Animation is R15)

Asked by 6 years ago

I'm not to bother anyone who may see this with other problems, those will come in near future! I'm trying to create a Speed potion with an R15 animation, but I can't get it to activate properly! I have taken other scripts from the normal catalog speed potion and those work just fine! Now is just the matter of getting the animation to activate upon clicking or activating the tool itself. The animation's name is ZTZ, don't ask why its just a random name.

Any info on how to clear this up would be greatly appreciated! For anyone who does try to help me, thank you! Considering i'm pretty new to the scripting scene, my scripting capabilities aren't too great...

0
1 we need to see your script 2. did you or roblox make this animation? justoboy13 153 — 6y
0
We need to see your script. If the script is not activating at all, then the problem is within the script, and if the script activates, but the animation doesn't work, then it might be the animation, or something that activates the animation, either case, please add the script as a codeblock here, preferably as an answer. Omega677 15 — 6y
0
Thank you both so much! :D This has been bothering me for a while, I made the animation my self mullenman 4 — 6y
0
I have put the script in the answers below, I hope on viewing it may aid in understanding the problem. In the future I will be sure to include the script! :D mullenman 4 — 6y

2 answers

Log in to vote
0
Answered by 6 years ago

could you please give the script it sounds like a script thing.

0
Thank you! I know I may have made some stupid mistakes, but as I have said, im horrible this. mullenman 4 — 6y
Ad
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago
local CanActivate = true
local player = game.Players.LocalPlayer
local character = player.Character

script.Parent.Activated:connect(function()
    if CanActivate = true then
        local animation = character.Humanoid:LoadAnimation(script.Parent.ZTZ)
        animation:Play()
    end
end)
0
Sorry If I had put this in the wrong place, Im still getting used to this site. After all this is my first question. mullenman 4 — 6y

Answer this question