#Animation/cutscenes not working together.

2 messages · Page 1 of 1 (latest)

gentle cedar
#

I use Codes Otaku Cutscene plugin to make a cutscene play on part touch, and I use the following script (that I put inside of the model I'm animating) to play an animation on a character when a part is touched.
Both the animation and the cutscene should happen at the same time when the humanoid touches a specific part

local run = script.beastrun
local rise = script.beasttwitch

local humanoid = script.Parent.Humanoid

local animtrack1 = humanoid:LoadAnimation(rise)
local animtrack2 = humanoid:LoadAnimation(run)

game.Workspace.SkellyTrigger.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
animtrack1:Play()
animtrack1.Ended:Wait()
animtrack2:Play()
end
end)

The problem I'm facing, is that most of the time either only the cutscene plays, or only the animation plays when I touch the part. It just feels random, and I don't know how I can fix this issue, so that both the animation and the cutscene play at the same time.

wary cargo