script.Parent.Touched:Connect(function(part)
local plr = game.Players:GetPlayerFromCharacter(part.Parent)
local x = plr:WaitForChild("PlayerGui").MoneyGUI.lvl.lvl.Text
if x == 1 then
plr.Character:MoveTo(Vector3.new(43.11, 244.315, -140.64))
end
end)
' 13:33:56.152 - Workspace.Part.Script:3: attempt to index nil with 'WaitForChild Its working without "if"

2 comments
You dont need it, just plr.PlayerGui and it will work
i have already tried that. it won't work