I made a animated door with tween service that uses click detectors, and wanted it to play a sound when you open/close it but it just ignores it.
local Service = game:GetService("TweenService")
local Gate = script.Parent.Parent.Gate
local Info = TweenInfo.new(2
script.Parent.ClickDetector.MouseClick:Connect(function()
game.ReplicatedStorage.DoorSound:Play()
script.Parent.CanCollide = false
local Change = {Position = Vector3.new(13.368, 4.705, 8.23)}
local Tween = Service:Create(Gate, Info, Change)
Tween:Play()
end)
Whats wrong with it?

6 comments
Use WaitForChild() on DoorSound. If you're getting an infinite yield warning, check to make sure that DoorSound is a child of ReplicatedStorage.
Welp i am getting an infinite yield warning and DoorSound is a child of ReplicatedStorage so...what now?
Hello?
Is anyone ever going to respond to thia again?
Try moving the sound to Workspace as part of the part. Don't think that it works in ReplicatedStorage.
Its still giving me an infinite yield warning