When touching a part... how to make a ScreenGui "pop up" then disappear after 1 second?

@LukeBLOXDaily So the code you gave me, is it supposed to be in a server script instead of a local script? Also Ive tried putting my original script inside the ScreenGui which is inside the StarterGui and the gui still doesnt pop up. Imma keep fidgeting

Eh keep it where it is, simply change the code in script. Im not sure but i think you said the script is in block (berry) you touch. If so the script should work perfectly

Nothing in playergui replicate to server, you can only change it if you cloned it from server then change it within that script.

1 Like

Oh hang on yes im sorry i didnt understand correctly, you must put it in a normal script inside the part you want to touch for it to work.

Sorry i think you have it wrong. You cannot access any PlayerGui’s appart from your own in a localscript, in server scripts you can acess everything in the game.

In case you still don’t understand you can look at @maximum_adhd 's reply on this post as I don’t want to search it in roblox docs
Source: Accessing PlayerGui in FE

1 Like

Oh and deathful one more thing, you shouldnt do this:

local Humanoid = hit.Parent:FindFirstChild("Humanoid") -- Find Humanoid
if Humanoid then

if you do and there is no humanoid, then it will give you an error:

Humanoid is not a valid object of model -- The error will look a bit like this

instead you should do this:

if hit.Parent:FindFirstChild("Humanoid") then
local Humanoid = hit.Parent:FindFirstChild("Humanoid")

I have filtering enabled on, use server scripts and access PlayerGui’s for every player that joins and exists so.?
And even mid game

I don’t know what else I could do, if you don’t know that it doesn’t replicate to server (common sense) and don’t want to look at top developers posts to understand there is not much left.

1 Like

What top developpers do does not concern me, my scripts work using everything he needs so im simply giving him the same type of script, if it does not work there is another simple way to do it but hey it works for me i dont know why it wouldnt work for ANYONE else in the entire world, and that isn’t really my problem. Anyways im jsut trying to help him if it does not work he can tell me since it should work from personal experience.

And btw it is the client that is replicated from server, any changes made inside client will not be made inside server, but changes made inside server will be made inside client.

You just got yourself, “any change from client is not replicated to the server”. Gui is purely clientsided and does not replicate to server.

1 Like

Lol dude. If you change a gui transparency form client, it wont change in server, PlayerGui is still accessible from server to any clients PlayerGui. Please just stop arguing on this dumb conversation. Ill fix it myself if it does not work. I always change gui’s inside server that way if i need to access them from another player, like i need to in my game, i can easily without having the wrong information.

I couldnt get code you gave me to work with a server script.

1 Like

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.

1 Like

aw ok :frowning: 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

1 Like

Just saying thats quite rude and you are quite ignorant. If anything im helping him more than you.

1 Like

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.

1 Like