The error: Workspace.Part.Script:11: Ambiguous syntax: this looks like an argument list for a function call, but could also be a start of new statement
The script in the part:
local part = script.Parent
part.Touched:Connect(
function(hit)
workspace.N_10BY.HumanoidRootPart.Anchored = true
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
if plr then
plr:WaitForChild("PlayerGui").Quest1.Frame.Visible = true
if part.Touched == false then
("PlayerGui").Quest1.Frame.Visible = true
wait(0.1)
("PlayerGui").Quest1.Frame.TextButton.Visible = true
wait(0.1)
("PlayerGui").Quest1.Frame.TextButton.Text = ("Hey, can you find my teddy bear? I lost it :(")
wait(5)
end
end
end
)
part.TouchEnded:Connect(
function(hit)
workspace.N_10BY.HumanoidRootPart.Anchored = true
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
plr:WaitForChild("PlayerGui").Quest1.Frame.Visible = false
end
)
