#Animation problem

126 messages · Page 1 of 1 (latest)

tropic hull
#

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Model = script.Parent

if Model and Model:FindFirstChild("Humanoid") then
local Humanoid = Model.Humanoid
local Animator = Humanoid:FindFirstChild("Animator") or Instance.new("Animator", Humanoid)
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://92100423660088"

local Track = Animator:LoadAnimation(Animation)
Track:Play()

end

scarlet ermine
#

issue?

#

@tropic hull

tropic hull
#

animation not playing

#

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Model = script.Parent

if Model and Model:FindFirstChild("Humanoid") then
local Humanoid = Model.Humanoid
local Animator = Humanoid:FindFirstChild("Animator") or Instance.new("Animator", Humanoid)
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://92100423660088"

local Track = Animator:LoadAnimation(Animation)
if not Track.IsPlaying then
    Track:Play()
end

end

#

i tried this too

#

nothing

#

i made the animation myself

scarlet ermine
#

type of script?
where is it located?
any errors?
who's the target you're trying to animate?

tropic hull
#

1)normal script inside a model inside replicated storage
2)inside a model in re0plicated storage
3)no errors
a model

scarlet ermine
tropic hull
#

yes

#

server

nimble sequoia
#

@tropic hull print Humanoid.Animator

nimble sequoia
#

see if it's even there

nimble sequoia
scarlet ermine
#

le epic print debugging

#

💪

tropic hull
#

where

#

im scared

nimble sequoia
#

i think it might be that you can't use Instance.new() in an or

nimble sequoia
tropic hull
#

no print

#

nothing

nimble sequoia
#

do it after the reference of animator

#

print(Humanoid.Animator)

tropic hull
#

it doesnt print anything

scarlet ermine
#
print("yea here for some reason")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Model = script.Parent

if Model and Model:FindFirstChild("Humanoid") then
    print("humanoid exists")
    local Humanoid = Model.Humanoid
    local Animator = Humanoid:FindFirstChild("Animator") or Instance.new("Animator", Humanoid)
    
    print("animator instance", Animator)
    local Animation = Instance.new("Animation")
    Animation.AnimationId = "rbxassetid://92100423660088"

    local Track = Animator:LoadAnimation(Animation)
    if not Track.IsPlaying then
        Track:Play()
    end
end
scarlet ermine
#

just uhm, using Instance.new("ClassName", Parent) is deprecated

tropic hull
#

no print

nimble sequoia
tropic hull
#

it doesnt print yea here for some reason

scarlet ermine
nimble sequoia
#

nothing was printed

scarlet ermine
tropic hull
#

the cloning process script is very long

scarlet ermine
#

just show how you clone and parent it

#

💀

nimble sequoia
#

send screenshots of the hierarchy aswell

gloomy crowBOT
#

studio** You are now Level 8! **studio

tropic hull
#

ok now it works

scarlet ermine
#

bruh

nimble sequoia
#

😭

tropic hull
#

but its a little buggy

#

only one timw works

#

not everytime i spawn it

buoyant marlin
#

bruh I read this whole thing to help and now its fixed lol

#

oh

#

nvm

nimble sequoia
#

send the whole script

#

screenshot it

#

or make a txt

tropic hull
#

nagi is a model that has a vfx

#

i only use the particle emitters in tha vfx and apply it to the stand model

#

this script is when i press E the stand spawn creating a black smoke

gloomy crowBOT
#

studio** You are now Level 4! **studio

tropic hull
#

and attaching the vfx called Nagi

nimble sequoia
#

regular

#

script

tropic hull
nimble sequoia
#

okay

#

@tropic hull you forget to change stand model to nil

tropic hull
#

no i did

#

in removestand fuction

#

at the end

nimble sequoia
#

k wait

#

no offence but this code isn't very readable or reliable

#

you should have a folder in replicated storage with an already made

#

smoke particle

buoyant marlin
#

yea

tropic hull
#

so i use waitforchild

buoyant marlin
#

I didnt bother reading it, was kinda messy with the particles being created in the script not pre-created

nimble sequoia
#

@tropic hull find where the problem is

#

using prints

tropic hull
#

the problem is animation not working everytime

#

this script works

#

the first one that i sent doesnt

buoyant marlin
#

yes but where is the script breaking

tropic hull
#

i dont know

buoyant marlin
#

then use prints

nimble sequoia
#

find our

#

out

tropic hull
#

the script doesnt "start"

buoyant marlin
#

check if its enabled

tropic hull
#

it is

buoyant marlin
#

when it spawns?

nimble sequoia
tropic hull
#

i tried to put a remote event

nimble sequoia
#

put a print at the very top

#

where is this

#

script

#

located

tropic hull
#

the first or second

nimble sequoia
tropic hull
#

print("yea here for some reason")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Model = script.Parent

if Model and Model:FindFirstChild("Humanoid") then
print("humanoid exists")
local Humanoid = Model.Humanoid
local Animator = Humanoid:FindFirstChild("Animator") or Instance.new("Animator", Humanoid)

print("animator instance", Animator)
local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://92100423660088"

local Track = Animator:LoadAnimation(Animation)
if not Track.IsPlaying then
    Track:Play()
end

end

nimble sequoia
tropic hull
#

Inside a model in replicated storage

nimble sequoia
tropic hull
#

Someone told me that script indie replicare strage doesnt work

nimble sequoia
#

this is a local script?

tropic hull
nimble sequoia
#

I'm pretty sure that's the case

buoyant marlin
#

yea

nimble sequoia
#

you should tag

#

all modela

#

models

#

and use

#

collection service

#

to do stuff

tropic hull
#

So I need to remove thos script from replicated storage

#

And put it into

nimble sequoia
#

yes

#

server script

tropic hull
#

Server script service

#

Ok now it works

#

Ty very much

nimble sequoia
#

no problem