Prefacing this thread: this whole thing is going to make me look like an idiot, i apologize
Long story short, I’m attempting to make a note that displays a GUI on the player’s screen when interacted with via proximity prompt. Nothing occurs when I hold the assigned proximity prompt button and interact.
Normally it is not possible to execute a script from a workspace to a StarGUI, in this case it is recommended to use RemoteEvents.
Start by creating a remote event in replicatedstorage
Script in workspace
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:FindFirstChild("Custom name remote")
script.parent.ProximityPrompt.Triggered:Connect(function(player)
RemoteEvent:FireClient(player) --- in case you want it to be shown to all players use FireAllClients
end)
Now create a LocalScript in the GUI that you want to display
localscript in gui
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:FindFirstChild("Custom name remote")
RemoteEvent.OnClientEvent:Connect(function(player)
script.parent.GUI.Visible = true
end)