Hi! So i was trying a simple script for the first time and it had an error, the problem with my script was it didnt pop a GUI according to this script, i am a bit new to the scripting language so dont judge by my level please, thanks.
game.Workspace.F.Touched:Connect(function()
local GUI = game.StarterGui.F
if game.Workspace.F.Touched then
GUI.Enabled = true
wait(5)
GUI.Enabled = false
end)
Dev Console couldnt detect the problem too so idk what was the problem, the GUI (F in StarterGUI) was false on being enabled at default, so what i expected from this script is that touching the part (F in workspace) will pop up the GUI and after waiting 5 secs, it will close... Please let me know how i can fix this, thanks so much!

3 comments
You will need to use remote events
If this is a server script, then it probably didn't work because server scripts can't access PlayerGUI, and you have to enable the GUI through the PlayerGUI not StarterGUI because all of the players would only see the change after they reset
is f a part or a model or something because you can only touch actual physical things you cant touch guis