Sliding Animation works in Studio, but not in Player?

I have a slide mechanic in my game, which itself works just fine but the animation for it doesn’t play outside of studio for some reason.

It’s in StartetCharacterScripts:

local UiS = game:GetService(“UserInputService”)
local Char = script.Parent
local humanoid = script.Parent:WaitForChild(“Humanoid”)

local slideAnim = Instance.new(“Animation”)
slideAnim.AnimationId = “rbxassetid://13641472825”

local keybind = Enum.KeyCode.E
local canslide = true

UiS.InputBegan:Connect(function(input, gameprocessed)
if gameprocessed then return end
if not canslide then return end

if input.KeyCode == keybind  and humanoid:GetState() ~= Enum.HumanoidStateType.Freefall then
	canslide = false
	
	local playAnim = Char.Humanoid:LoadAnimation(slideAnim)
	playAnim:Play()
	
	humanoid.HipHeight = 0.2
	
	local slide = Instance.new("BodyVelocity")
	slide.MaxForce = Vector3.new(1,0,1) * 30000
	slide.Velocity = Char.HumanoidRootPart.CFrame.lookVector * 100
	slide.Parent = Char.HumanoidRootPart
	
	Char.Humanoid.MaxSlopeAngle = 1
	for count = 1,8 do
		wait(0.1)
		slide.Velocity *= 1
	end
	Char.Humanoid.MaxSlopeAngle = 89

	playAnim:Stop()
	humanoid.HipHeight = 2.3
	slide:Destroy()
	wait(.7)
	canslide = true
end

end)

1 Like

Should I also provide video, i’m not really sure this is one of my first times posting

1 Like

Is the animation uploaded under your profile while the game is under a group or vice versa? If so, you need to have the animation under the same ownership as the game (so upload the anim under a group if the game is under a group, upload under your profile if the game is under your profile)

1 Like

I just checked after you said that and I uploaded the anim to my profile instead of the group the game is in, and I’m facepalming so hard ;-;

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.