generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Not finding screengui?

Previous Thread :: Next Thread 
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
18 Sep 2015 05:52 PM
game.Players.PlayerAdded:connect(function(plr)
if plr.PlayerGui:WaitForChild("ScreenGui") then
plr.PlayerGui.ScreenGui.TextButton.MouseButton1Down:connect(function()
print("Works!")
end)
end
end)


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
expoundings is online. expoundings
Joined: 02 Feb 2013
Total Posts: 2359
18 Sep 2015 05:56 PM
Remove the if statement???
Report Abuse
brados123 is not online. brados123
Joined: 24 Nov 2012
Total Posts: 2143
18 Sep 2015 05:56 PM
So has the screen GUI already been created itself? With the script, you want the GUI to be in workspace, and there's another Line of code to move it as a descendant of workspace to a descendant of playergui.
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
18 Sep 2015 05:56 PM
uhhhh why? if i do it just gives an error saying ScreenGui not found


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
18 Sep 2015 05:57 PM
its in startergui, so its moved there already... its there


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
18 Sep 2015 05:59 PM
Help?


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
18 Sep 2015 06:01 PM
FE?
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
18 Sep 2015 06:02 PM
FE is not enabled


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
18 Sep 2015 06:03 PM
no FE, no service

jk

just use a localscript and put it in textbutton
also turn FE on or die
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
18 Sep 2015 06:04 PM
Id love to but im gonna use loadstring so i cant :/


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
18 Sep 2015 06:07 PM
cmon


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
18 Sep 2015 06:09 PM
dont use loadstring
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
18 Sep 2015 06:11 PM
y? im making a sb


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
18 Sep 2015 06:12 PM
use a custom loadstring or upload a model using httpservice

also, anyone can make a crappy sb that can handle server script stuff, it's much more difficult for client loadstring


while true do ur mom
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
18 Sep 2015 06:13 PM
how does one make a custom loadstring?


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
18 Sep 2015 06:14 PM
virtual machine


while true do ur mom
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
18 Sep 2015 06:15 PM
wait i need a vm for this? or i can make a vm on roblox? XD


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
Pinkerten is not online. Pinkerten
Joined: 03 Aug 2014
Total Posts: 840
18 Sep 2015 06:16 PM
This script is terrible e.e


script.Parent.Button.MouseButton1Down:connect(function()
print("Works!")
end)
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
18 Sep 2015 06:19 PM
pink you obviously dont know how to script if you answer my question with that


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
Pinkerten is not online. Pinkerten
Joined: 03 Aug 2014
Total Posts: 840
18 Sep 2015 09:27 PM
Wrote this yesterday
-- script1
repeat wait() until _G.loaded
function _G.rep.Events.Place.OnServerInvoke(player,model,pos,targ)
local model = _G.rep.Folder[model]
if targ then
local clickland = targ.Parent:FindFirstChild("Land")
local hasland = model:FindFirstChild("Land")
if (hasland and not clickland) or (clickland and not hasland) then
local stats = player.Stats
model = model:Clone()
model.Parent = _G.gameitems
model.Owner.Value = player
_G.ModelModel(model,pos)
for i,v in pairs(_G.resources)do
stats[v].MaxValue = stats[v].MaxValue + _G.revenue[model.Name][v][2]
end
return true
end
end
end
function _G.rep.Events.GetInfo.OnServerInvoke()
return _G.resources,_G.revenue
end
_G.rep.Events.Buy.OnServerEvent:connect(function(player,item)
local enough = true
for _,v in pairs(_G.resources)do
if _G.revenue[item][v][1] <= player.Stats[v].Value then
else
enough = false
break
end
end
if enough then
for _,v in pairs(_G.resources)do
player.Stats[v].Value = player.Stats[v].Value - _G.revenue[item][v][1]
end
local tool = game.ServerStorage.Tool:Clone()
tool.Name = item
tool.Parent = player.Backpack
tool.LocalScript.Disabled = false
end
end)
_G.rep.Events.Delete.OnServerEvent:connect(function(player,item)
if item then
local model = item.Parent
if model.Parent == _G.gameitems and model.Owner.Value == player then
model:Destroy()
end
end
end)
-- script2
repeat wait() until _G.loaded
local function code()
for _,v in pairs(_G.gameitems:GetChildren())do
local owner = v.Owner.Value
local revenue = _G.revenue[v.Name]
local stats = owner.Stats
for i,v in pairs(_G.resources)do
stats[v].Value = stats[v].Value + revenue[v][3]
end
end
end
while true do
local oldtick = tick()
code()
while tick()-oldtick < 1 do
wait()
end
end
--script 3
repeat wait() until _G.loaded
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local resources,stats = game.ReplicatedStorage.Events.GetInfo:InvokeServer()
local dozing
local function color(r,b,g)
return Color3.new(r/255,b/255,g/255)
end
local function clearInfo()
for _,v in pairs(script.Parent.Shop.Info:GetChildren())do
v.Text = ""
end
end
for i,v in pairs(resources)do
local gui = script.gui:Clone()
gui.Parent = script.Parent.Shop.Info
gui.Name = v
gui.Text = ""
gui.Position = UDim2.new(0,0,0,(i-1)*gui.Size.Y.Offset)
end
for i,v in pairs(game.ReplicatedStorage.Folder:GetChildren())do
local gui = script.button:Clone()
gui.Text = v.Name
gui.Name = v.Name
gui.Parent = script.Parent.Shop
gui.Position = UDim2.new(0,0,0,(i-1)*gui.Size.Y.Offset)
if v:FindFirstChild("Land") then
gui.TextColor3 = color(10,140,0)
end
gui.MouseEnter:connect(function()
for _,v in pairs(script.Parent.Shop.Info:GetChildren())do
v.Text = v.Name..": "..stats[gui.Name][v.Name][1]..", "..stats[gui.Name][v.Name][2]..", "..stats[gui.Name][v.Name][3]
end
end)
gui.MouseLeave:connect(clearInfo)
gui.MouseButton1Click:connect(function()
game.ReplicatedStorage.Events.Buy:FireServer(gui.Name)
end)
end
for i,v in pairs(resources)do
local gui = script.gui:Clone()
gui.Parent = script.Parent.Data
gui.Name = v
gui.Position = UDim2.new(0,0,0,(i-1)*gui.Size.Y.Offset)
end
local function check(targ)
if dozing and targ then
local owner = targ.Parent:FindFirstChild("Owner")
if owner and owner.Value == player then
return true
end
end
return false
end
script.Parent.Shop.Doze.MouseButton1Click:connect(function()
dozing = not dozing
end)
mouse.Button1Down:connect(function()
if check(mouse.Target) then
game.ReplicatedStorage.Events.Delete:FireServer(mouse.Target)
end
end)
game["Run Service"]:BindToRenderStep("MoveHover",2,function()
local targ = mouse.Target
if check(targ) then
script.box.Adornee = targ
end
end)
while wait() do
for _,v in pairs(resources)do
script.Parent.Data[v].Text = v..": "..player.Stats[v].Value.."/"..player.Stats[v].MaxValue
end
end
--script 4
_G.rep = game.ReplicatedStorage
_G.resources = {"Water","Food","Knowledge","Electricity","Population","Oil","Metals","Wood","Stone"}
_G.revenue = {
Home = {
Water = {0,0,0}, -- Cost, Storage, Income
Food = {0,0,0},
Electricity = {0,0,0},
Population = {0,0,0},
Oil = {0,0,0},
Metals = {0,0,0},
Wood = {0,0,0},
Stone = {0,0,0},
Knowledge = {0,0,0}
},

}
_G.gameitems = script.Gameitems
_G.gameitems.Parent = workspace
_G.ModelModel = require(_G.rep.Scripts.MoveModel)
repeat wait() until _G.playerReady
_G.loaded = true
-- Probably about half the scripts
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
19 Sep 2015 07:53 AM
Ok cool, you still didnt come anywhere close to solving my problem


It's simple physics, Robux: R$266, Tix: Tx44,213
Report Abuse
Pinkerten is not online. Pinkerten
Joined: 03 Aug 2014
Total Posts: 840
19 Sep 2015 09:53 AM
I literally just saw your code on top and didn't read anything else. I saw that you were doing something terribly wrong
Report Abuse
oscar9999991 is not online. oscar9999991
Joined: 15 Nov 2009
Total Posts: 11373
19 Sep 2015 09:55 AM
mk then fix what i was doing wrong, key words... "I DIDNT READ YOUR CODE"


It's simple physics, Robux: R$288, Tix: Tx3,882
Report Abuse
Pinkerten is not online. Pinkerten
Joined: 03 Aug 2014
Total Posts: 840
19 Sep 2015 09:56 AM
I read your code, I didnt read your words
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image