Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why does the animation not play on R15 tool?

--Makes the food etable
--Variables
script:WaitForChild("TilCashOut")

local plr = game.Players.LocalPlayer
local Char = plr.Character
local Brick = script.Parent
CanContinue = true
TilCashOut = plr.plrvalues.BricksPerCash.Value
TilCash = script.TilCashOut

--WaitForChilds
plr:WaitForChild("leaderstats")
plr:WaitForChild("plrvalues")
script.Parent:WaitForChild("EatReach")
script.Parent:WaitForChild("EatLoop")

local function onActivate()
	if CanContinue == true then
	--Animation loader, variables
	local AnimEat = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.EatReach)
	local Animloop = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(script.Parent.EatLoop)
	
	AnimEat:Play()
	if TilCash.Value == plr.plrvalues.BricksPerCash.Value then
	plr.leaderstats.Cash.Value = plr.leaderstats.Cash.Value + plr.plrvalues.PerCashOut.Value * plr.plrvalues.CashMultip.Value
	TilCash.Value = 0
	end
	
	TilCash.Value = TilCash.Value + 1
	
	script.Parent.Eating:Play()
	CanContinue = false
	Animloop:Play()
	wait(2)
	Animloop:Stop()
	script.Parent.Eating:Stop()
	
	plr.leaderstats.Bricks.Value = plr.leaderstats.Bricks.Value + plr.plrvalues.PerBrick.Value * plr.plrvalues.Multiple.Value
	
	CanContinue = true
	
	else
	--Do nothing
	end

end
Brick.Activated:Connect(onActivate)

I've done everything possible, I can't figure out why the animation doesn't play. Any idea?

Thanks!

2 comments

0

I used this site a decent amount but recently found: https://devforum.roblox.com/c/development-support and you get a reply within like 5-10 min most likely.

0

If im gonna be honest this site takes days if not weeks sometimes for a reply, still like this site but would recommend devforum instead for faster replys

2 answers

Have you tried checking the priority and making sure it's action so it can play whilst other animations are playing? And are you sure it's an R15 rig animation?

1 comment

0

You need to download the animation to your computer, then you need to publish it to roblox. Look up how to do that if you don't know how.

Hmm, I feel like your animation isn't fit with R15 avartar type (maybe). I tested your script, it work pretty well.

Solution

Just check again your animation.

Hope i helped you!

This discussion is preserved as it was. New answers, comments, and votes are closed.