So, What I want to do is make it so that the player’s camera is attached to a dummy when an animation plays, so that the player can see the view of the dummy when the animation is playing, for it to stop when the animation stops, like a glory kill used in Undead Nation. I want to also mention that I need help on putting the player’s camera view on a separate part, which is the dummy’s head.
[i wanted it to look like this]
[and here’s the script. that ill change later when I get the chance to]
wait() local Humanoid = script.Parent.Humanoid Humanoid.BreakJointsOnDeath = false local DA = Instance.new("Animation") DA.AnimationId = "rbxassetid://ID" local DeathAnimation = Humanoid:LoadAnimation(DA) local camera = game.Workspace.CurrentCamera local dummy = script.Parent Humanoid.HealthChanged:Connect(function(Health) if Health <= 0 then print("Died") script.Parent.HumanoidRootPart.Anchored = true script.Parent.Head.SelectionBox.Visible = true script.Parent.Torso.ProximityPrompt.Enabled = true local function onTouched(hit) local human = hit.Parent:FindFirstChild('Torso') if (human ~=nil) then script.Parent.HitBox:Destroy() script.Parent.BackHitBox:Destroy() script.Parent.Head.SelectionBox.Visible = false human.Anchored = true human.Parent.HumanoidRootPart.CFrame = script.Parent.HumanoidRootPart.CFrame + Vector3.new(0,0,2) script.Parent.PlayerLeft.Transparency = 0 script.Parent.PlayerLeft.BrickColor = human.Parent:FindFirstChild("Left Arm").BrickColor script.Parent.PlayerRight.Transparency = 0 script.Parent.PlayerRight.BrickColor = human.Parent:FindFirstChild("Right Arm").BrickColor DeathAnimation:Play() wait(.6) script.Parent.grab:Play() wait(.7) script.Parent.Crack:Play() script.Parent.blood:Play() wait(.8) script.Parent.PlayerLeft.Transparency = 1 script.Parent.PlayerRight.Transparency = 1 human.Anchored = false wait(2) human.Anchored = false script.Parent:Destroy() end end script.Parent.Torso.ProximityPrompt.Triggered:connect(onTouched) end end)
The thing is that I either can’t find the right topic for this, or when I find the right topic, it just doesn’t work.
I’m using a glory kill template cause I’m lazy, but none of the others have cameras including the one I’m using. I really need help on this, so if you can I would appreciate it.