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 » Game Design
Home Search
 

Re: Filtering GUI functions

Previous Thread :: Next Thread 
BACONATORBISH is not online. BACONATORBISH
Joined: 12 Dec 2015
Total Posts: 7
11 Apr 2016 10:15 PM
I have a script in workspace called RemoteEventInvoke and has this in it:

for i,v in pairs(game.Players:GetPlayers()) do
if v:FindFirstChild("PlayerGui") then
if v.PlayerGui:FindFirstChild("Inv") then
v.PlayerGui.Inv.InventoryCilentInvoke:WaitForChild("InventoryOpener")
v.PlayerGui.Inv.OpenInventory.MouseButton1Click:connect(function(click)
v.PlayerGui.Inv.InventoryCilentInvoke.OpenInventory:FireCilent()
end)
end
end
end

There's a local script inside a GUI named Inv and locates to the local script and the remote event inside of it.

That local script contains this and is the function to open and close a inventory:
script:WaitForChild("InventoryOpener")
script.InventoryOpener.OnClientEvent:connect(function()
if script.Parent.OpenInventory.Text == "Open Inventory" then
script.Parent.OpenInventory.Text = "Close Inventory"
script.Parent.InventoryFrame.Visible = true
elseif script.Parent.OpenInventory.Text == "Close Inventory" then
script.Parent.OpenInventory.Text = "Open Inventory"
script.Parent.InventoryFrame.Visible = false
end
end)

-- both scripts wait for the inventoryopener remote event.
-- no errors are in the output and I have tested this clearly both in online and studio mode


xloadinq 2fat4u boyeeee
Report Abuse
BACONATORBISH is not online. BACONATORBISH
Joined: 12 Dec 2015
Total Posts: 7
11 Apr 2016 10:16 PM
forgot to add in the end of the forum that:

Does anyone know why this doesn't work and has prior knowledge with using scripts and local scripts while in filtering whilst also knowing RemoteEvents?

I would greatly appreciate any answer and it would be help me with scripting in filtering.


xloadinq 2fat4u boyeeee
Report Abuse
Bobbrige is not online. Bobbrige
Joined: 27 Jul 2010
Total Posts: 411
11 Apr 2016 10:28 PM
If you want to get faster and better answers, you should check this site out:
https://scriptinghelpers.org/

And even though the description for the forum says not to ask for help, Scripting is full of help requests that usually don't get players banned.
https://forum.roblox.com/Forum/ShowForum.aspx?ForumID=33

Unfortunately, I am too lazy to offer any input at the moment and I'm also not familiar with local scripts.
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
12 Apr 2016 12:43 PM
":FireCilent()"

Client*

Your problem is probably because

v.PlayerGui.Inv.InventoryCilentInvoke:WaitForChild("InventoryOpener")

The script never finds "InventoryOpener"
v.PlayerGui.Inv.OpenInventory.MouseButton1Click:connect(function(click)

You can't set up a MouseButton1Click event in a server script because that event won't work as expected when you're running it on the server.

If all you're trying to do is make a GUI's visibility toggle, you don't need to use any remote events for that because only the client is going to need to see that.
Report Abuse
BACONATORBISH is not online. BACONATORBISH
Joined: 12 Dec 2015
Total Posts: 7
12 Apr 2016 04:21 PM
i did findfirstchild and waitforchild
they both dont work
nor if the inventoryopener was changed to openinventory


xloadinq 2fat4u boyeeee
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
12 Apr 2016 04:25 PM
PlayerGui is weird with FE. Print to see if it finds playergui and print to see if it finds what you're looking for. Use findfirstchild
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
12 Apr 2016 04:30 PM
Don't place RemoteEvents in players.
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
12 Apr 2016 04:33 PM
oh wait

Like I said don't even use a remote event for this. Just place a localscript in your frame and

If all you're trying to do is make a GUI's visibility toggle, you don't need to use any remote events for that because only the client is going to need to see that. [2]
Report Abuse
BACONATORBISH is not online. BACONATORBISH
Joined: 12 Dec 2015
Total Posts: 7
12 Apr 2016 06:31 PM
i was just wondering and i saw a tut where the remote-event placed in startertool while working so ye



i know how 2 script!11!1 print('im hot')
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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