ProximityPrompt.Triggered:Connect(function()
game.StarterGui.SandCheck.TextButton.Visible = true
game.StarterGui.SandCheck.FrameHolder.Visible = true
game.StarterGui.SandCheck.No.Visible = true
game.StarterGui.SandCheck.Yes.Visible = true
end)```
The client opens up the gui but the servers it wont show the gui.
Try this:
ProximityPrompt.Triggered:Connect(function(player) -- Gets the Player who Triggered the Prompt
player.PlayerGui.SandCheck.Enabled = true -- Enables the PlayerGui under the Player
end)
ProximityPrompt.Triggered:Connect(function()
game.StarterGui:SetCore("SendNotification", {
Title="Sand Check",
Text="Open the Sand Check GUI?",
Button1="Yes",
Button2="No",
Duration=15,
Callback=function(action)
if action == "Yes" then
game.StarterGui.SandCheck.TextButton.Visible = true
game.StarterGui.SandCheck.FrameHolder.Visible = true
game.StarterGui.SandCheck.No.Visible = true
game.StarterGui.SandCheck.Yes.Visible = true
end
end
})
end)
No errors but the gui still does not wanna pop up even know visible = true
guis are on the client why do you want the server to control when it opens. plus StarterGui isnt PlayerGui
you should be making it visible on the client (if you arent already)
local plr = game:GetService("Players").LocalPlayer
ProximityPrompt.Triggered:Connect(function()
plr.PlayerGui.SandCheck.TextButton.Visible = true
plr.PlayerGui.SandCheck.FrameHolder.Visible = true
plr.PlayerGui.SandCheck.No.Visible = true
plr.PlayerGui.SandCheck.Yes.Visible = true
end)
StarterGui is PlayerGui
when the Player joins, the StarterGui goes to PlayerGui, hense the name
editing StarterGui does not edit PlayerGui
ok so first up, place a proximity prompt inside a part in the workspace
then, make your screen gui in starter gui. (preferably all parented to a frame or scrolling frame)
then, place a local script inside the frame
write this:
local proxprom = game.Workspace.TriggerPart.ProximityPrompt —change TriggerPart to the name of your part
proxprom.Triggered:Connect(function()
script.Parent.Visible = true
end)
When I do edit StarterGui, it edits PlayerGui
not while in game
dhhdhdbshdhrbbd
still does not work well like no errors it just doesnt pop up the gui if i check it itll say true but in game its not showing idk if its a studio problem but it should work tbh
It doesn’t pop up to everyone else, and is the script your using a localscript?
No, its a script because the script parent is the part, and im using a Proximity
This is because the code is attempting to modify the StarterGui, which is a client-side object. In order to make the GUI visible on the server, you will need to use a RemoteFunction or use a RemoteEvent to communicate with the server and then use a script to modify the StarterGui.
- Use PlayerGui instead of StarterGui
What I would try doing is, (not sure if this works)
PROXIMITY PROMPT SCRIPT
local ShowAllGuiEvent = game.ReplicatedStorage:WaitForChild("ShowAllGuiEvent")
ProximityPrompt.Triggered:Connect(function()
ShowAllGuiEvent:FireServer(SandCheck.TextButton)
ShowAllGuiEvent:FireServer(FrameHolder) FrameHolder.Visible = true
showallguievent:FireServer(blahblah)
showallguievent:FireServer(blahblah)
end)
SERVERSCRIPT
-- Variables
local ShowAllGuiEvent = game.ReplicatedStorage:WaitForChild("ShowAllGuiEvent")
local PlayersService = game:GetService("Players")
ShowAllGuiEvent.OnServerEvent:Connect(function(desiredui)
for _, player in pairs(PlayersService:GetPlayers()) do -- Looping through players
player.PlayerGui.desiredui.Visible = true -- desiredbox will be visible to the player that is being looped on
end
end)
i dont know if this hasnt been solved yet, but here:
local prompt = script.Parent
local open = false
prompt.Triggered:Connect(function(player)
local PlayerGui = player:WaitForChild("PlayerGui")
local ScreenGui = PlayerGui.SandCheck
if open == false then
open = true
game.StarterGui.SandCheck.TextButton.Visible = true
game.StarterGui.SandCheck.FrameHolder.Visible = true
game.StarterGui.SandCheck.No.Visible = true
game.StarterGui.SandCheck.Yes.Visible = true
else
open = false
game.StarterGui.SandCheck.TextButton.Visible = false
game.StarterGui.SandCheck.FrameHolder.Visible = false
game.StarterGui.SandCheck.No.Visible = false
game.StarterGui.SandCheck.Yes.Visible = false
end
end)