So here is my script:
local lookVector = script.Parent.Parent.Adornee.Parent["LOOK AT ME"].Position
local cookingAnimation = script.Parent["Animation"]
script.Parent.TextButton.MouseButton1Click:connect(function()
local playerWhoClick = game.Players.LocalPlayer
playerWhoClick.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(-5.75, 3, 62.7), lookVector)
playerWhoClick.Character.Humanoid.WalkSpeed = 0
playerWhoClick.Character.Humanoid.JumpPower = 0
local animationTrack = playerWhoClick.Character.Humanoid:LoadAnimation(cookingAnimation)
animationTrack:Play()
wait(1)
animationTrack:Play()
wait(1)
animationTrack:Play()
wait(1)
print("Played.")
playerWhoClick.Character.Humanoid.WalkSpeed = 16
playerWhoClick.Character.Humanoid.JumpPower = 50
end)
Everything was working fine until I modified line 08. I added in the lookVector in it's initialization. What's strange is that is that it's not like after the CFrame line exits the script or anything, and the lines where I change the WalkSpeed and JumpPower work fine. I assume the problem is in the
animationTrack:Play()
lines. No animation plays. This wasn't happening before, please help.
