Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Script decide to stop working? and i do not know why!

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?

5 comments

0

any errors?

0

No

0

jerryisgod29 No

0

Have you tried play testing it in roblox, instead of roblox studio?

0

yes

1 answer

✓ Accepted answer

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.

1 comment

0

well thats half of my questions so ill wait and then give an accept ok becouse i still need a fix for the door

This discussion is preserved as it was. New answers, comments, and votes are closed.