So i recently took some help from others to create a "url bar" in my computer, here's the code.
--- Configuration --- plr = game.Players.LocalPlayer comp = plr.PlayerGui.NNet notice = comp.Notice -- Domains -- youtube = comp.Websites.YouTube roblox = comp.Websites.Roblox twitter = comp.Websites.Twitter -- Code -- comp.MainFrame.UrlBar.FocusLost:connect(function() input = comp.MainFrame.UrlBar.Text if input == "youtube.rbx" or input == "www.youtube.rbx" or input == "http://youtube.rbx" then youtube.Visible = true notice.Visible = true notice:TweenPosition(UDim2.new(0, 100,0, 300), "Out", "Quad") wait(4) notice:TweenPosition(UDim2.new(0, 0,0, 0), "Out", "Quad") wait(2) notice.Visible = false elseif input == "roblox.rbx" or input == "www.roblox.rbx" or input == "http://roblox.rbx" then roblox.Visible = true notice.Visible = true notice:TweenPosition(UDim2.new(0, 100,0, 300), "Out", "Quad") wait(4) notice:TweenPosition(UDim2.new(0, 0,0, 0), "Out", "Quad") wait(2) notice.Visible = false elseif input == "twitter.rbx" or input == "www.twitter.rbx" or input == "http://twitter.rbx" then twitter.Visible = true notice.Visible = true notice:TweenPosition(UDim2.new(0, 100,0, 300), "Out", "Quad") wait(2) notice:TweenPosition(UDim2.new(0, 0,0, 0), "Out", "Quad") wait(2) notice.Visible = false else comp.MainFrame.UrlBar.Visible = false comp.MainFrame.UrlError.Visible = true comp.Websites.YouTube.Visible = false comp.MainFrame.UrlError.Text = "ERROR: Url Not Found!" wait(4) comp.MainFrame.UrlError.Visible = false comp.MainFrame.UrlBar.Visible = true end end)
Here's my problem,
The script works in Solo Mode but wont work in a server (clicking play out of studio), so i am trying to figure out why that is... There are no errors, i've tried if statements for all of them, it works either way.
So if you could please help me with trying to figure out why my gui doesn't work in an actual server
=============
New Errors (5/17/2014)
13:50:54.356 - Notice is not a valid member of ScreenGui 13:50:54.357 - Script 'Players.Player1.PlayerGui.NNet.MainFrame.UrlBar.DomainCheck', Line 4 13:50:54.357 - Stack End
BUT! Notice is a valid member.
Screenshot: puu.sh/8Q9iW.png
I setup a quick gui, of what was in the gui-picture you uploaded.
Classic case of ROBLOX being too slow to load guis, or.. rather Local Scripts running before the Guis have loaded.
Here you go.
--- Configuration --- plr = game.Players.LocalPlayer comp = plr.PlayerGui.NNet repeat wait() until comp:FindFirstChild("Notice") notice = comp.Notice -- Domains -- youtube = comp.Websites.YouTube roblox = comp.Websites.Roblox twitter = comp.Websites.Twitter -- Code -- comp.MainFrame.UrlBar.FocusLost:connect(function() input = comp.MainFrame.UrlBar.Text if input == "youtube.rbx" or input == "www.youtube.rbx" or input == "http://youtube.rbx" then youtube.Visible = true notice.Visible = true notice:TweenPosition(UDim2.new(0, 100,0, 300), "Out", "Quad") wait(4) notice:TweenPosition(UDim2.new(0, 0,0, 0), "Out", "Quad") wait(2) notice.Visible = false elseif input == "roblox.rbx" or input == "www.roblox.rbx" or input == "http://roblox.rbx" then roblox.Visible = true notice.Visible = true notice:TweenPosition(UDim2.new(0, 100,0, 300), "Out", "Quad") wait(4) notice:TweenPosition(UDim2.new(0, 0,0, 0), "Out", "Quad") wait(2) notice.Visible = false elseif input == "twitter.rbx" or input == "www.twitter.rbx" or input == "http://twitter.rbx" then twitter.Visible = true notice.Visible = true notice:TweenPosition(UDim2.new(0, 100,0, 300), "Out", "Quad") wait(2) notice:TweenPosition(UDim2.new(0, 0,0, 0), "Out", "Quad") wait(2) notice.Visible = false else comp.MainFrame.UrlBar.Visible = false comp.MainFrame.UrlError.Visible = true comp.Websites.YouTube.Visible = false comp.MainFrame.UrlError.Text = "ERROR: Url Not Found!" wait(4) comp.MainFrame.UrlError.Visible = false comp.MainFrame.UrlBar.Visible = true end end)