Please watch your post bumping. (Posting over and over without keeping all of the words you say in one post.) Anyway, this is the “animation” part of the code.
function onActivated()
if sp.Enabled and not sp.Taunting.Value then
sp.Enabled = false
local character = sp.Parent;
local humanoid = character.Humanoid
if humanoid == nil then
print("Humanoid not found")
return
end
SlashSounds[math.random(#SlashSounds)]:Play()
sp.Handle.Trail.Enabled = true
local newanim = anims[math.random(1,#anims)]
while newanim == sp.RunAnim.Value do
newanim = anims[math.random(1,#anims)]
end
sp.RunAnim.Value = newanim
if newanim == "OverHeadSwing" then
damage = swingdamage
else
damage = slashdamage
end
wait(.3)
sp.Handle.Trail.Enabled = false
damage = basedamage
sp.Enabled = true
end
end
Are you sure there is not a function connected to sp that detects a change in value
--in this line
sp.RunAnim.Value = newanim
--check if there is anywhere in the code that has this:
sp.Changed:Connect(function()
end
--[[
anyways i have told you how to load and play animations
and i'm sure i am correct i have many animations in a project
im working on and thats how you do it.]]--
If you are just going to reject people’s suggestions without trying, don’t post. This thread already lacks enough information as it is. Please read the category guidelines for more information and details on what should be included in a help request.
Dumping an entire script here, especially if it isn’t yours, and saying it doesn’t work isn’t sufficient enough for a thread in this category.
Flag your own post under “Something Else” and ask for it to be deleted, or update your thread with actual information to work off of. Such can include (but is not limited to):
Console errors
Code hierarchy
Animation setup
Owner info (where its being uploaded and/or used at)
Please also use the reply button on a post rather than at the bottom. People can’t see when you reply so they don’t get notifications and have to constantly come back to see if there’s a reply to what they said or not.
Interpret this as a literal error. The object RunAnim isn’t a descendant of StringValue (whatever StringValue is). This is something that can be resolved if you put some time into debugging your code. Please address code issues what you can by yourself first before posting a thread.
It’d be worth investing into the concepts of writing in (Roblox) Lua to help you with this in the future.
that saying you tried to index something thats not a property of a string value, try clicking on that error to go to line in the script with that error
Yes you can. Take some time to read up on the Developer Hub or learn coding. Investing enough time into writing in Lua is valuable and worth doing if you’re interested in developing on the platform, rather than relying on the forums to support you for every small problem (despite the category’s summary).
Oh, I thought you meant investing MONEY, I’m like “that’s crazy”, no, you meant TIME. Time is kind of the one thing I don’t have too much of. But I have…just enough. Anyway, I think I may or may not be able to invest time into concepts of Lua if I wanted to.
You can its really not that difficult once you get the gist of it and you can always ask questions here and tons of people are willing and able to help
Practice and try to understand others’ code to further reinforce your own knowledge.
Keep practicing because it builds up with time.
You should avoid posting vague topics on code, especially when you don’t describe what you think is going wrong, and what you’ve already tried. It’s generally easier to help someone who already has basic understanding, but you shouldn’t just throw code out and expect people to debug and fix it for you completely.
I know it says you want the topic to be closed, but I need to know, is the animation priority at ‘action’? If not, other animations will just override it.