#Skinmesh Animate problem

1 messages · Page 1 of 1 (latest)

modest garden
#

Basically whenever i join it adds a new animate script. Even when i put one in the starterCharacter, I tried making it a local script and normal script.

#

Idk if i need to like custom script my own animate or if theres a simple fix

#

Tested on Both RigType R6 and R15. neither work

#

it js says like torso and stuff missing error, cuz it replaces the one i allready have in it

waxen kite
#

Every player comes with an animate script if that's what you're wondering.

obtuse shuttleBOT
#

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

waxen kite
#

what are you trying to achieve again. May you state it clearer?

modest garden
#

custom animations, I allready have a custom animate script in the character, but when i join it replaces it with a new one

waxen kite
#

for custom animations, you would need to do it manually

#

you would need to check when the humanoid's state changes.

#

Next you would you need to play that animation then stop it if it the state reverts to normal

craggy atlas
#

like ur custom one can be "CustomAnimate" and just find and delete the one that gets created with each character

#

optimal? no idea, but it has always worked out

craggy atlas
waxen kite
craggy atlas
narrow tartan
#
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local AnimLoader = require(ReplicatedStorage.Animations.ModuleScript)
local activeCharacters = {}
local function setupCharacter(char)
    if activeCharacters[char] then return end

    local humanoid = char:WaitForChild("Humanoid")
    local anims = {
        fall = AnimLoader.LoadAnimation(script.Fall, char),
        idle = AnimLoader.LoadAnimation(script.Idle, char),
        walk = AnimLoader.LoadAnimation(script.Walk, char)
    }

    activeCharacters[char] = true

    local conn
    conn = RunService.Heartbeat:Connect(function()
        if not char.Parent then
            conn:Disconnect()
            activeCharacters[char] = nil
            return
        end

        local isGrounded = humanoid.FloorMaterial ~= Enum.Material.Air
        local isMoving = humanoid.MoveDirection.Magnitude > 0 and humanoid.WalkSpeed > 0

        if not isGrounded then
            anims.idle:Stop()
            anims.walk:Stop()
            if not anims.fall.IsPlaying then anims.fall:Play() end
        elseif isMoving then
            anims.idle:Stop()
            anims.fall:Stop()
            if not anims.walk.IsPlaying then anims.walk:Play() end
        else
            anims.walk:Stop()
            anims.fall:Stop()
            if not anims.idle.IsPlaying then anims.idle:Play() end
        end
    end)
end

local function handleCharacter(char)
    if not char:FindFirstChild("Humanoid") then return end
    local player = Players:FindFirstChild(char.Name) or char:FindFirstChild("NPC")
    if player then
        task.spawn(setupCharacter, char)
    end
end

for _, char in workspace:GetChildren() do
    handleCharacter(char)
end

workspace.ChildAdded:Connect(handleCharacter)

craggy atlas
#

the way you're saying this seems like my pc will blow up if i use roblox animate

dark delta
#

It auto-insert in player character and also

#

Remove the default animate

#

However you reset the character

#

Don’t insert in the character because the default will take over