#Skinmesh Animate problem
1 messages · Page 1 of 1 (latest)
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
Every player comes with an animate script if that's what you're wondering.
** You are now Level 4! **
?
what are you trying to achieve again. May you state it clearer?
custom animations, I allready have a custom animate script in the character, but when i join it replaces it with a new one
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
what i do is just delete the old animate script when they join the game, keeping the custom one
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
it works, ty
just keep in mind that if the player resets their animte script will too
but you will be fine because you detect on when a character is added. And so when a player respawns they code will run again so they will be safe.
for me sometimes it wont run so i thought it would be worth mentioning
PLEASE, PLEASE, PLEASE DO NOT USE ROBLOX ANIMATE IF U WANNA DO DIFFERENT IDLES, BASED OF AN STATES
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)
the way you're saying this seems like my pc will blow up if i use roblox animate
Insert the script inside startercharacterscript
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