So, I am trying to make a dialog GUI its supposed to only appear for the player who clicks the torso of the dummy but instead it does it for all players and i cant use local player and, I have tried quite a few things but it doesn't even give me a error if you could help me out then thank you
game.Players.PlayerAdded:Connect(function(plr)
local CommLog = Instance.new("ScreenGui")
local Text = Instance.new("Frame")
local wow = Instance.new("TextLabel")
local function onClicked()
workspace.Dummy.Torso.ClickDetector.MaxActivationDistance = 0
game.Players.name.Character.Humanoid.WalkSpeed = 0
Text.Visible = true
wow.Text = "H"
wait(0.30)
wow.Text = "Hi"
wait(4)
Text.Visible = false
wow.Text = ""
plr.Character.Humanoid.WalkSpeed = 16
workspace.Dummy.Torso.ClickDetector.MaxActivationDistance = 32
end
game.Workspace.Dummy.Torso.ClickDetector.MouseClick:connect(onClicked)
end)

5 comments
Use a LocalScript to do the GUI coding. Server shouldn't be doing this for any reason.
i have tried moving and editing it to a LocalScript it didnt even appear
There are many things wrong with this script. A few things being that it should be in a LocalScript, you didn't parent the ScreenGui, Frame, or TextLabel to anything, you used "name" instead of "Name", and you used "connect" instead of "Connect". Fixing these most likely wouldn't completely fix your problem, but you should fix them to get somewhat closer to a solution.
Unfortunately I cannot look into this further right now as I have to leave, but if you haven't solved your problem by the morning I will be happy to try to solve the problem then.
@incapaz, he needs a remote event. He needs Client for GUI Handling, and the Server for the MouseClick event stuff.