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
 

Re: GUIs In Nil?

Previous Thread :: Next Thread 
TeamDman is not online. TeamDman
Joined: 04 Dec 2009
Total Posts: 897
08 Jan 2013 04:50 PM
Would it be possible for a player to have GUI objects in nil? ( Still be able to have their events fire when clicked? )

§TeamDman§ Anti-Jared
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
08 Jan 2013 04:53 PM
If the GuiObject is in nil, then it's not clickable.
Report Abuse
AbsoluteLOL is not online. AbsoluteLOL
Joined: 01 Dec 2012
Total Posts: 3939
08 Jan 2013 04:53 PM
script.Parent = nil
script:Remove()

Both of these will keep the scripts running, but just parent them to nil. Removing the GUI object will obviously remove it from the screen. I hope this is what you were asking for.
Report Abuse
TeamDman is not online. TeamDman
Joined: 04 Dec 2009
Total Posts: 897
08 Jan 2013 04:54 PM
Sorry, I meant having the player's parent as nil, not the GUIs.

§TeamDman§ Anti-Jared
Report Abuse
AbsoluteLOL is not online. AbsoluteLOL
Joined: 01 Dec 2012
Total Posts: 3939
08 Jan 2013 04:56 PM
Use ::Remove() or set the Parent property of the Player to nil. The GUI will still be usable.
Report Abuse
IamAwesome777 is not online. IamAwesome777
Joined: 18 Jul 2011
Total Posts: 2640
08 Jan 2013 04:56 PM
Yes, that should still work.

I think that's how stickmasterluke made his 'Draw It!' game.
Report Abuse
zars15 is not online. zars15
Joined: 10 Nov 2008
Total Posts: 9999
08 Jan 2013 04:56 PM
Mm no, I think if player is placed in nil, they loose connection to server(well not really, they can see chat and stuff).
Report Abuse
IamAwesome777 is not online. IamAwesome777
Joined: 18 Jul 2011
Total Posts: 2640
08 Jan 2013 04:57 PM
I think he meant setting the character to nil.

Player.Character = nil
Report Abuse
AbsoluteLOL is not online. AbsoluteLOL
Joined: 01 Dec 2012
Total Posts: 3939
08 Jan 2013 04:59 PM
Only ::Destroy() removes all GUIs and what-not from the player. Using deprecated ::Remove() is simply the best way to go if you want GUIs to stay operational after the player is removed.
Report Abuse
TeamDman is not online. TeamDman
Joined: 04 Dec 2009
Total Posts: 897
08 Jan 2013 05:00 PM
Players can still do things in nil via localscripts.
Once a player is removed or parented to nil the guis are removed.
I was wondering if it was possible to have GUIS on your screen whilst your player.Parent == nil and be able to interact with them.

§TeamDman§ Anti-Jared
Report Abuse
AbsoluteLOL is not online. AbsoluteLOL
Joined: 01 Dec 2012
Total Posts: 3939
08 Jan 2013 05:01 PM
Are you sure you're using ::Remove()/p.Parent = nil? Double check that you're not using ::Destroy()...
I've seen others still Admin Abuse without being in the game through the use of GUI-powered pseudo-players.
Report Abuse
Vitouliss14 is not online. Vitouliss14
Joined: 18 Mar 2009
Total Posts: 7918
08 Jan 2013 05:09 PM
GUI's don't get removed for me when I parent my player to nil.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
08 Jan 2013 05:13 PM
Why do people think nil is a thing?
Report Abuse
TeamDman is not online. TeamDman
Joined: 04 Dec 2009
Total Posts: 897
08 Jan 2013 06:32 PM
Are you testing that in studio?
In a server ( not a studio server either) parenting to nil or doing anything to change the parent of your player will remove the GUIs.

§TeamDman§ Anti-Jared
Report Abuse
VisualCSharp is not online. VisualCSharp
Joined: 23 Nov 2012
Total Posts: 225
08 Jan 2013 06:38 PM
CoreGui is the answer.
Report Abuse
xXxMoNkEyMaNxXx is not online. xXxMoNkEyMaNxXx
Joined: 03 Oct 2008
Total Posts: 3120
08 Jan 2013 07:09 PM
@arceus Because it is a thing, it's a value that represents nothing, it is not actually nothing.
Report Abuse
Vitouliss14 is not online. Vitouliss14
Joined: 18 Mar 2009
Total Posts: 7918
08 Jan 2013 07:14 PM
@TeamDman

It seems like it does kick your player from the server.

Hmm, I'll keep that in mind.
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
08 Jan 2013 07:44 PM
"@arceus Because it is a thing, it's a value that represents nothing, it is not actually nothing."

If we're going to argue about language, nil is an idea.
Report Abuse
noliCAIKS is not online. noliCAIKS
Joined: 08 Mar 2010
Total Posts: 917
09 Jan 2013 12:18 PM
I did it a while ago.
I used a billboardgui that follows the camera with a invisible local part, and simulated all events.
Unfortunately, billboardguis are quite buggy; they flicker more the further they are away from the origin (0, 0, 0) and clipsdescendants doesn't work properly on images, making the use of tilemaps impossible.
Report Abuse
TeamDman is not online. TeamDman
Joined: 04 Dec 2009
Total Posts: 897
09 Jan 2013 06:41 PM
Did you have to re-size anything to accommodate the billboard gui?

§TeamDman§ Anti-Jared
Report Abuse
noliCAIKS is not online. noliCAIKS
Joined: 08 Mar 2010
Total Posts: 917
11 Jan 2013 09:54 AM
Yeah. I used something like this:

local players = game:GetService("Players")
local runService = game:GetService("RunService")
local player = players.LocalPlayer
local mouse = player:GetMouse()
local cameraPart = Instance.new("Part")
local cameraGui = Instance.new("BillboardGui")

function InitializeCameraGui()
cameraPart.Anchored = true
cameraPart.BottomSurface = "Smooth"
cameraPart.CanCollide = false
cameraPart.FormFactor = "Custom"
cameraPart.Locked = true
cameraPart.Size = Vector3.new(0.2, 0.2, 0.2)
cameraPart.TopSurface = "Smooth"
cameraPart.Transparency = 1
cameraGui.Adornee = cameraPart
cameraGui.AlwaysOnTop = true
cameraGui.Parent = cameraPart
runService.Heartbeat:connect(function()
UpdateCameraGui()
end)
end
function UpdateCameraGui()
local camera = workspace.CurrentCamera
if camera then
cameraPart.CFrame = camera.CoordinateFrame * CFrame.new(0, 0, -64)
cameraGui.Size = UDim2.new(0, mouse.ViewSizeX, 0, mouse.ViewSizeY)
if cameraPart.Parent ~= camera then
cameraPart.Parent = camera
end
end
end

InitializeCameraGui()


It might seem strange that I used RunService.Heartbeat, but the Changed event is broken for "Custom" type cameras and the Heartbeat event has a relatively convenient timing.
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