Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

someone help me get this error:Infinite yield possible on 'Workspace.door:WaitForChild("Door1")'?

Asked by 2 years ago
Edited by Shawnyg 2 years ago

i am trying to make a sliding door but i Always get this error: Infinite yield possible on 'Workspace.door:WaitForChild("Door1")'


local TweenService = game:GetService("TweenService") local door1 = workspace.door:WaitForChild("Door1") local door2 = workspace.door:WaitForChild("door2") local tweeningInformation = TweenInfo.new( 0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0 ) local door1Open = {CFrame = CFrame.new(-24.25, 5.5, -99)} local door2Open = {CFrame = CFrame.new(-24.25, 5.5, -85)} local door1Close = {CFrame = CFrame.new(-24.25, 5.5, -94.5)} local door2Close = {CFrame = CFrame.new(-24.25, 5.5, -89.5)} local tween1open = TweenService:Create(door1,tweeningInformation,door1Open) local tween1close = TweenService:Create(door1,tweeningInformation,door1Close) local tween2open = TweenService:Create(door2,tweeningInformation,door2Open) local tween2close = TweenService:Create(door2,tweeningInformation,door2Close) script.Parent.Detector1.Touched:Connect(function(hit) print(hit.Name .. "was touched by the part") tween1open:Play() tween2open:Play() wait(2) tween1close:Play() tween2close:Play() end) script.Parent.Detector2.Touched:Connect(function(hit) tween1open:Play() tween2open:Play() wait(2) tween1close:Play() tween2close:Play() end
0
there is No need for FindFirstChild() if the door1 is already replicated. Hi_People1133 218 — 2y
0
Placed your code in a code block (the Lua icon) Shawnyg 4330 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

Possibly it doesn't exist.

Ad

Answer this question