Hello when i tested my game yesterday evrything worked but today i tested it and it does not work i didn't change anything about it
Here are the scripts that do not work the first makes the door swing and the other one is to play a animation
local TweenService = game:GetService("TweenService") local door = workspace.Door local doorRoot = door.PrimaryPart local DoorSwingInfo = TweenInfo.new(0.2) local DoorSwingTween = TweenService:Create(doorRoot, DoorSwingInfo, { CFrame = doorRoot.CFrame * CFrame.Angles(0,math.rad(-80), 0) }) script.OPENUP.TimePosition = 0.4 game.Workspace.House.DoorHandle.ProximityPrompt.Triggered:Connect(function() wait(2) game.Workspace.Value.Value = 1 script.OPENUP.Playing = true DoorSwingTween:Play() end)
--------------------------------------------------------------------Script barrier
local anim = Instance.new("Animation") anim.AnimationId = "rbxassetid://6422157733" local controller = script.Parent.Humanoid -- path to Humanoid/AnimationController game.Workspace.House.DoorHandle.ProximityPrompt.Triggered:Connect(function() wait(2.5) controller:LoadAnimation(anim):Play() wait(4.2) script.Parent:Destroy() end)
Does any one have a solution?
Roblox has deprecated the function Humanoid:LoadAnimation. For the variable controller, use script.Parent.Humanoid:WaitForChild("Animator") instead of script.Parent.Humanoid. Also, check if all the paths still exist.