#it wont loop through everything

1 messages · Page 1 of 1 (latest)

grizzled sable
#
    print(animatedparts.Name)
    if animatedparts:IsA("Part") then
        print(animatedparts.Parent)
        if animatedparts.Parent:IsA("Model") then return end
        animatedparts.Changed:Connect(function(prop)
            print(prop)
            if prop == animatedparts:GetAttribute("Completed") then
                animate(animatedparts)
            end
        end)
    end
end```
(local script)
grizzled sable
twin zealot
#

in workspace

#

probably yes

#

and thats why the parts arent loading in

grizzled sable
#

streaming

#

is on

grizzled sable
twin zealot
#

try looping on the server

#

and printing

grizzled sable
#

i already did that

#

it works

#

but i need to to work on the local script

twin zealot
#

optimisation feature

grizzled sable
#

oh

twin zealot
#

try without

grizzled sable
#

well

#

most of them

grizzled sable
grizzled sable
twin zealot
#

oh i see its folders too the streamingenabled wont even help

#

also i dont see why return

#

what about continue?

#

so it does the next thing in the loop

grizzled sable
# twin zealot also i dont see why return

i jsut want it to loop throught all that parts

    print(animatedparts.Name)```
but it only prints 4 parts and just stops
thats because i dont want it to loop through the models
grizzled sable
twin zealot
grizzled sable
#

bruh

grizzled sable
grizzled sable
grizzled sable
# twin zealot

wait i have 1 more question
in a different script it changes the attribute "Completed" to true and i tested that and it works but the function never fires in the script i showed u

            print(prop)
            if prop == animatedparts:GetAttribute("Completed") then
                animate(animatedparts)
            end
        end)```
twin zealot
#

just put if animatedparts:GetAttribute("Completed") then

#

because that means if true

#

i dont think the prop variable is even anything

grizzled sable
#

it doesnt even print prop

twin zealot
#

getattributechangedsignal

#

google getattributechangedsignal roblox studio documentation

grizzled sable
#

ok

grizzled sable
#
            print("changed!")
            if animatedparts:GetAttribute("Completed") == true then
                animate(animatedparts)
            end
        end)```
twin zealot
#

connect function

grizzled sable
#

i did

twin zealot
#

GetAttributeChangedSignal:Connect

grizzled sable
#

the GetAttributeChangedSignal thing relpaced :Connect()

twin zealot
#

what line is that

grizzled sable
twin zealot
#

what line is that

grizzled sable
#

@twin zealot

twin zealot
#

animatedparts:GetAttributeChangedSignal:Connect()(function()

#

no

#

wait

#

animatedparts:GetAttributeChangedSignal("Completed"):Connect(function()

grizzled sable
#

@twin zealot

#

oh

#

nvm i fixed it

twin zealot
#

use google and chatgpt

#

not to write code but for little things