So I have a Dialogue that shows after you interact with Proximity Prompt:
local rs = game:GetService("ReplicatedStorage")
local ProximityPrompt = script.Parent
ProximityPrompt.TriggerEnded:Connect(function(player)
script.Parent.ClickablePrompt = false
local turtle = script.Parent.DialogueGui -- that dialogue
turtle.Parent = player.PlayerGui
end)
And I want to make it (the proximity prompt) invisible/uninteractable to the player who already used it, but others still can interact with it
I’m not entirely sure how to do that, since I don’t know how you can disable it locally in the first place, so if there’s any solutions - thanks in advance!
Use a remote event to tell the client to disable their proximity prompt, and add server side validation to make sure they can’t press it again.
Change your server script to this:
--//Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--//Variables
local HideDialoguePrompt = ReplicatedStorage.HideDialoguePrompt
local ProximityPrompt = script.Parent
--//Tables
local hasInteracted = {}
--//Functions
ProximityPrompt.Triggered:Connect(function(player)
if hasInteracted[player] then
return
end
hasInteracted[player] = true
HideDialoguePrompt:FireClient(player)
local turtle = ProximityPrompt.DialogueGui:Clone()
turtle.Parent = player.PlayerGui
end)
Make a RemoteEvent called HideDialogue:
Make a LocalScript in StarterPlayerScripts, and paste this inside:
--//Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--//Variables
local HideDialoguePrompt = ReplicatedStorage.HideDialoguePrompt
local ProximityPrompt = workspace.ProximityPrompt --//Reference your proximity prompt
--//Functions
HideDialoguePrompt.OnClientEvent:Connect(function()
ProximityPrompt.Enabled = false
end)