You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to stop a walk animation when I freeze the player by anchoring the HumanoidRootPart.
What is the issue? Include screenshots / videos if possible!
The issue is in the title. I can’t immediately stop a walk animation since I don’t know how.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I can’t seem to find a solution on the Developer Hub.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local Player = game.Players.LocalPlayer
Player.CharacterAdded:Wait()
local Character = Player.Character
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local Camera = workspace.CurrentCamera
local Info1 = TweenInfo.new(1,Enum.EasingStyle.Circular,Enum.EasingDirection.In,0,false,0)
local Target1 = {CFrame = workspace.SecondPosition.CFrame}
repeat task.wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.BeginPosition.CFrame
local Tween1 = TweenService:Create(Camera, Info1, Target1)
local Info2 = TweenInfo.new(1.5,Enum.EasingStyle.Sine,Enum.EasingDirection.In,0,false,0)
local Target2 = {CFrame = workspace.FinalPosition.CFrame}
local Tween2 = TweenService:Create(Camera,Info2,Target2)
ReplicatedStorage.Events.BridgeBreak.OnClientEvent:Connect(function()
Character.Humanoid:WaitForChild("Animator"):LoadAnimation(Character.Animate.idle.Animation1)
Character.HumanoidRootPart.Anchored = true
Tween1:Play()
Tween1.Completed:Wait()
Tween2:Play()
Tween2.Completed:Wait()
ReplicatedStorage.Events.BridgeBreak:FireServer()
end)
ReplicatedStorage.Events.BridgeEnd.OnClientEvent:Connect(function()
repeat task.wait()
Camera.CameraType = Enum.CameraType.Custom
until Camera.CameraType == Enum.CameraType.Custom
game.Players.LocalPlayer.Character.HumanoidRootPart.Anchored = false
end)
I need to figure a way to stop the animation and anchor the humanoid root part so the player looks like it is frozen in place.
Are you sure? While I turn on PlatformStand it stops any walking sounds.
Maybe you can try my other option, which is stopping the player first, then freezing them. With this option, you can try setting the WalkSpeed to 0 then freezing them.
You can try muting the walking sound, the sounds are in the HumanoidRootPart. Set the volume of the Running sound to 0, then when you want them to move again, set it to 0.65.
It turns out that the audio was in the Head. In the script, the Camera type is Scriptable, but when converting it back to Custom, it goes to the right of the player.