Hello I am a starter developer working on a game and I am trying to make a dialogue where when a player interacts on the proximity prompt named “Talk” it triggers a serverscriptservice script so I am trying to make it where when it triggered it the proximityprompt will disable for the player who triggered it but for the others who didn’t will still be enabled, so heres the script on server script service:
Information might be needed:
- ProximityPrompt is on a Rig’s Torso in workspace folders
local RS = game:GetService("ReplicatedStorage")
local PPS = game:GetService("ProximityPromptService")
PPS.PromptTriggered:Connect(function(prompt, plr)
if prompt.Name == "Talk" then
local HRP = plr.Character:FindFirstChild("HumanoidRootPart")
local Chat = RS.NPCDialogue.Martin.MartinChat:Clone()
local Talk = prompt:FindFirstChild("Talk 1")
prompt.Enabled = false
Chat.Parent = plr.PlayerGui
Chat.MainFrame.Chat.Script.Enabled = true
Talk:Play()
HRP.Anchored = true
wait(1.65)
Chat.MainFrame.Button1.Visible = true
end
end)