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

14 comments
Yes on both, i've tried print, it works, but the gui still doesn't show while in a real server..
In server, press Alt-F9. It'll show the output from the Server and your Client. Perhaps there's a problem when a server is started
Ok thanks, shall do.
Editing my post with new errors
At the beggining of the script, add this: repeat wait() until game.Players.LocalPlayer and game.Players.LocalPlayer.PlayerGui:FindFirstChild("NNet")
No still same error...Could this just be a ROBLOX error?
Add a long wait time, see if still bugs out. Because sometimes LocalScripts load BEFORE the Player and stuff loads. Either that, or add another repeat wait() until comp:FindfirstChild("Notice")
It's tell it's coming from LINE 4 - Where notices = comp.Notices
Yes it says it's not a member of ScreenGui (NNet), or hasn't loaded yet. This happens a lot, and usually a Wait fixes it.
I've tried both things you suggested. Nothing.
Any ideas?
Last test, put DomainChecker at the route of the Gui (NNet).
That worked, why was it doing that?!
Not sure, the DomainChecker had loaded before the gui, and just couldn't find the paths. Atleast it's fixed now.