I couldnt get code you gave me to work with a server script.
Yeah, Imma try this instead. Using cloning as I should say
I got it to work with remote events but dont want anyway of someone screwing with my game
Thank you everyone for the help. I have a been only scripting for a month now so I learned a lot from this post haha
In case you wanted to avoid remotes and fix your code you can:
-place it in playergui(as localscript)
-change where is says âif Playerâ to âif Player and Player == game.Players.LocalPlayerâ
And it should work, in case it doesnât tell me and also try to avoid what luke is saying.
aw ok i can give you another code that will 95% work, theres a tiny chance it doesnt but i can give it if you want me to
Just saying thats quite rude and you are quite ignorant. If anything im helping him more than you.
Donât want to be rude but on top of all source I provided you still donât even want to think that itâs different of what you think. Letâs say your theory is correct that means deleting gui on client would still leave it on server as it doesnât replicate, you just have to think to figure out it makes zero to no sense.
Why does that not make sense? I find it reasonable that it doesnt replicate in server, no?
Also if my theory is correct what i did in my game is needed, i need to access other players PlayerGuiâs, wich you cannot do from clientside.
In case one source was not enough:
So according to what you told me, this script should not work correct:
for i,p in pairs(game.Players:FindFirstChild(target).PlayerGui.Binder:GetChildren()) do
since it is in a server script and is accessing the PlayerGui
My apologies if i am incorrect I couldnt understand fully but what i understood was what im doing in my game wich does work, i must have misunderstood, have a nice day tho.
It wonât and it shouldât work.
Yup, code works now. Thank you.
Heres a simple way
âLocal Scriptâ
script.Parent.Touched:Connect(function(hit)
game.StarterGui.ScreenGui.Enabled = true
wait(1)
game.StarterGui.ScreenGui.Enabled = false
You cannott use a local script inside workspace, Local scripts are only for the local player/client and does not affect anything else. And also changing the guiâs in StarterGui would not change it for the player since the StarterGui are the guiâs you start with, you would have to access the PlayerGui.