|
| 30 Jul 2017 11:57 AM |
I already made a forum about this but there was loads of tags and stuff so here we go!
Line which wont work is
game, Players, :Find First Child (name), :Find First Child ("Player Gui"), AFK Button, Main Frame, AFK Button, Event, On, :Fire Client()
Hope this works and comers are suppose to be dots and I had to put a few spaces!
I am trying to get it so the script (local) sends a event to the server (Which I have done) and hen this script checks a value, if it is false it changes the value (which works) and then sends an event back to change the Gui. However when I test a server there is nothing in the players Gui which stops the script from sending the event (because of filtering enables), please reply if you know how to resolve this. Thanks
(Btw the :Find First Child (name) works as earlier in the script I made the valuable.) |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Jul 2017 01:20 PM |
| You can't access PlayerGui from the server |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2017 01:24 PM |
| Oh, so how would I change the players Gui then? Should I use remote events still to access it or not. |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2017 01:27 PM |
| it depends on which side you're calling the remote on and what you want it to do |
|
|
| Report Abuse |
|
|
BaiYuni
|
  |
| Joined: 09 Oct 2009 |
| Total Posts: 2861 |
|
|
| 30 Jul 2017 01:29 PM |
for _, player in pairs(game.Players:GetPlayers()) do player.PlayerGui:FindFirstChild("ScreenGui"):Destroy end
? |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2017 01:37 PM |
?
I'm not changing the text for all players I am only doing it for a single individual but the script is in the server. Also I don't want to destroy the Gui's xD |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2017 01:39 PM |
| I'm calling the first remote on the client to server which works but there is a remote in one of the Gui's which I want to access from the server. Is this possible. I already have the player in the script I just need to be able to access there Gui's. |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2017 01:49 PM |
then you can define OnClientEvent on the client then just fire that client:
--LS
remote.OnClientEvent:Connect(function(d) print(d) end)
--SS
remote:FireClient(player,print_This) |
|
|
| Report Abuse |
|
|
|
| 30 Jul 2017 01:54 PM |
| Since I am not that advanced at LUA I'm just gonna make two separate buttons for on and off so the server doesn't have to send a message. I really do appreciate the help though! |
|
|
| Report Abuse |
|
|