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

Why doesn't my repeat wait() until work in this function?

Asked by 9 years ago
function ontouched(part)
local hum = part.Parent:FindFirstChild("Humanoid")
if hum and game.Players:GetPlayerFromCharacter(part.Parent) and hum ~= nil then
local gui1 = game.Players:GetPlayerFromCharacter(part.Parent):WaitForChild("PlayerGui"):WaitForChild("Gui4"):WaitForChild("Frame")
local gui2 = game.Players:GetPlayerFromCharacter(part.Parent):WaitForChild("PlayerGui"):WaitForChild("Gui5"):WaitForChild("Frame")
local gui3 = game.Players:GetPlayerFromCharacter(part.Parent):WaitForChild("PlayerGui"):WaitForChild("Gui6"):WaitForChild("Frame")
game.Workspace.Dummy.Torso.Anchored = false
script.Parent.Position = Vector3.new(-50,50,50)
gui1.label1.Visible = false
gui2.label1.Visible = true
gui2.label1:Destry()
repeat wait() until game.Workspace.Dummy.Humanoid.Health == 0
gui3.label1.Visible = true
game.StarterPack.Sword.Enabled = true
wait(4)
end
end
script.Parent.Touched:connect(ontouched)

0
Why downvote? It's legitimate question. qq dirty_catheter 7 — 9y
1
Look closely at line 11. TheeDeathCaster 2368 — 9y
0
Thanks. dirty_catheter 7 — 9y

1 answer

Log in to vote
1
Answered by
Aokz 5
9 years ago

At line 11, you misspelled "Destroy".

Ad

Answer this question