- What do you want to achieve? Keep it simple and clear!
I recently learned how to make cutscenes, in studio the animation is fine but when I playtest it, my joints go haywire.
- What is the issue? Include screenshots / videos if possible!
THIS video shows you what the animation looks like in studio, and what it looks like after.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Yep.
local debounce = false
function activate()
print("Flag 1")
local character : Model = script.Parent.Parent
local humanoid = character:FindFirstChildWhichIsA("Humanoid")
local torso : BasePart = character.Torso
local sound = game.ServerStorage.Sounds.Rengoku:Clone()
sound.Parent = character.HumanoidRootPart
customFuncs.setWalkSpeed(humanoid,0)
-- add parts
local vfxRengoku = serverStorage.Cutscene["VFX(RENGOKU)"]:Clone()
vfxRengoku.Parent = character
local camera = serverStorage.Cutscene.CameraModel:Clone()
camera.Parent = character
print("Flag 2")
for i, v in pairs(vfxRengoku:GetChildren()) do
if v:IsA("Script") then continue end
if v.Name ~= "katana" then
v.Motor6D.Part0 = torso;
else
v.Motor6D.Part0 = character["Right Arm"];
end
end
camera.Camera.Motor6D.Part0 = torso
print("Flag 3")
repeat wait() until character:FindFirstChild("CameraModel")
-- tweek camera
--game.ReplicatedStorage.Remotes.Camera:FireClient(game.Players:GetPlayerFromCharacter(character),true,character.CameraModel.Camera);
-- animation
local track = character:FindFirstChildWhichIsA("Humanoid"):LoadAnimation(script.Animation)
sound:Play()
track:Play()
track.Ended:Wait()
--game.ReplicatedStorage.Remotes.Camera:FireClient(game.Players:GetPlayerFromCharacter(character),true,character.CameraModel.Camera);
customFuncs.setWalkSpeed(humanoid,50)
-- post animation (dragon)
vfxRengoku.DragonHead.DragonHeadInner.Transparency = 0;
vfxRengoku.DragonHead.DragonHeadOuter.Transparency = 0.4;
print("Flag 4")
-- reset player
sound.Ended:Wait()
humanoid:TakeDamage(99999)
print("Flag 5")
end
script.Parent.Activated:Connect(function()
if debounce then return end
debounce = true;
activate()
end)