local player = script.Parent.Parent.Parent.Parent.Parent.Parent
local char = player.Character
local selectedStyle = "Majin"
local button = script.Parent
local hum = char:WaitForChild('Humanoid')
button.MouseButton1Click:Connect(function()
local AnimationSets = game.ServerStorage.AnimationSets
local Styles = AnimationSets:FindFirstChild('Majin')
print('Majin')
if AnimationSets:FindFirstChild(player.Name) then
Styles = AnimationSets:FindFirstChild(player.Name)
end
char:WaitForChild('Client'):FindFirstChild('Animations'):Destroy()
local AnimationFolder = Styles:Clone()
AnimationFolder.Name = 'Animations'
AnimationFolder.Parent = char:WaitForChild('Client')
local Animations = char:WaitForChild('Client'):WaitForChild('Animations')
for _, animation in Animations:GetChildren() do
local animator = hum:WaitForChild("Animator")
local loadedAnim = animator:LoadAnimation(animation)<< line erroring
end
for _, animation2 in Animations['Fighting Style']:GetChildren() do
local animator2 = hum:WaitForChild("Animator")
local loadedAnim = animator2:LoadAnimation(animation2)<< line erroring
end
selectedStyle = button.Name
end)
so i made a dash script but… It is whacky and it doesn’t find all the parts or models in the player and i been trying to fix it without doing alot
for _, v in pairs(c:GetChildren()) do
if v:IsA("Accessory") then
if v:FindFirstChild('Handle') then
v:FindFirstChild('Handle').Transparency = 1
end
end
end
for _, v in pairs(c:GetChildren()) do
if v:IsA("Part") then
v.Transparency = 1
end
end
for _, v in pairs(c:GetChildren()) do
if v:IsA("Model") then
if v:IsA("Part") or v:IsA("MeshPart") then
v.Transparency = 1
end
end
end
for _, v in pairs(c.PlayerOutline:GetChildren()) do
if v:IsA("MeshPart") then
v.Transparency = 1
end
end ```
oh you just put the ` next to number 1 three times and the lua right after it and after that you put your code then the three ``` again and boom code in
welcome and this is my first time doing this type of scripting LOL you think you can help me fix it up to work? i never done fighting styles before and having to load new animations to play them through button select it was always
for _, animation in Animations:GetChildren() do
local animator = hum:WaitForChild("Animator")
local loadedAnim = animator:LoadAnimation(animation)
end
end)```