#Unfixable error

1 messages · Page 1 of 1 (latest)

severe ember
#

So i continued coding my game but there was this one error and no matter what i did, it didn't fix. Any help is needed

#

and heres the code

#

local wash = false
local Prompt = script.Parent
print("variables done")

script.Parent.Triggered:Connect(function(plr)
if wash == false then
wash = true
Prompt:Destroy()
task.wait(10)
print("Wash variable done")
for i,plr in pairs(game.Players:GetChildren()) do
if plr:IsA("Player") then
local plrgui = plr.PlayerGui
plrgui.Objective.TextUI.Text = "Objective: Explore the House"
task.wait(15)
for i,plr in pairs(game.Players:GetChildren()) do
if plr:IsA("Player") then
local plrgui = plr.PlayerGui
plrgui.Objective.TextUI.Text = "Objective: Go Outside"
local Prompt2 = Instance.new("ProximityPrompt")
Prompt2.Parent = game.Workspace.ExitDoor
Prompt2.MaxActivationDistance = 10
Prompt2.HoldDuration = 10
Prompt2.ActionText = ""
Prompt2.Triggered:Connect(function(brodcast)
game.StarterGui.TeleportScript.Enabled = true

        print("Text changed")
else    

wash = false
    for i,plr in pairs(game.Players:GetChildren()) do
            if plr:IsA("Player") then
                local plrgui = plr.PlayerGui
                plrgui.Objective.TextUI.Text = "Objective: Wash Your Hands"
            end
        end 
        print("did wrong")
end

end)

manic quiver
#

you forgot to close
Prompt2.Triggered:Connect(function(brodcast)
with an " end) "

#

here's the edited code incase you need it:

local wash = false
local Prompt = script.Parent
print("variables done")

script.Parent.Triggered:Connect(function(plr)
if wash == false then
wash = true
Prompt:Destroy()
task.wait(10)
print("Wash variable done")
for i,plr in pairs(game.Players:GetChildren()) do
if plr:IsA("Player") then
local plrgui = plr.PlayerGui
plrgui.Objective.TextUI.Text = "Objective: Explore the House"
task.wait(15)
for i,plr in pairs(game.Players:GetChildren()) do
if plr:IsA("Player") then
local plrgui = plr.PlayerGui
plrgui.Objective.TextUI.Text = "Objective: Go Outside"
local Prompt2 = Instance.new("ProximityPrompt")
Prompt2.Parent = game.Workspace.ExitDoor
Prompt2.MaxActivationDistance = 10
Prompt2.HoldDuration = 10
Prompt2.ActionText = ""
Prompt2.Triggered:Connect(function(brodcast)
game.StarterGui.TeleportScript.Enabled = true
end)
print("Text changed")
else
wash = false
for i,plr in pairs(game.Players:GetChildren()) do
if plr:IsA("Player") then
local plrgui = plr.PlayerGui
plrgui.Objective.TextUI.Text = "Objective: Wash Your Hands"
end
end
print("did wrong")
end
end
end
end
end
end)

#

please tell me if it works now

severe ember
pale raftBOT
#

studio** You are now Level 7! **studio