What do i want to achieve
I want to make a proximity prompt to open a gui
What have I tried
--Script in ServerScriptService
local edit = game.Workspace.ScriptingStand.StandMesh.Edit
local RS = game:GetService('ReplicatedStorage')
local guiopener = RS:WaitForChild('GuiOpener')
local function fireclient(player)
guiopener:FireClient(player)
end
--local Script in StarterPlayerScripts
local RS = game:GetService('ReplicatedStorage')
local GuiOpener = RS:WaitForChild('GuiOpener')
local Players = game:GetService('Players')
local player = Players.LocalPlayer
local ScreenGui = player.PlayerGui:WaitForChild('TextScreenGui')
local lighting = game:GetService('Lighting')
local edit = workspace.ScriptingStand.StandMesh.Edit
GuiOpener.OnClientEvent:Connect(function(player)
edit.Triggered:Connect(function()
ScreenGui.Enabled = true
end)
end)