I am trying to make a onTouch event, but the only line I can remember is:
When the part is touched??? Can I have some help please???
So screen GUIs hold frames or buttons. A screen GUI is just what gets the button onto the screen.
Let’s say I put ScreenGui into StarterGui and put a frame inside it called frame. Set the frames visibility to false.
Then I put a part in workspace called part.
You can put this in a local script inside starterGui, characterscripts or playerscripts.
local player = game.Players.LocalPlayer local part = game.Workspace.part part.Touched:Connect(function(hit) player.PlayerGui.ScreenGui.frame.Visible = true end)
Or you could put it in a script (not a localscript)inside the part:
local part = script.Parent part.Touched:Connect(function(hit) local player = GetPlayerFromCharacter(hit.Parent) player.PlayerGui.ScreenGui.frame.Visible = true end)