Code:
local button = script.Parent local Plrs = game:GetService("Players") local rs = game:GetService("ReplicatedStorage") local remote = rs:WaitForChild("toRemote") Plrs.PlayerAdded:Connect(function(player) script.username.Value = player.Name end) local char = game.Workspace:WaitForChild(script.username.Value) local plr = Plrs:GetPlayerFromCharacter(char) button.MouseClick:Connect(function() print("Done!") remote:FireClient(game.Players:FindFirstChild(plr)) print("Done!") end)
When I press the button, nothing happens. It doesn't print "Done!" either time, and I am very confused. Any help is appreciated.
Use :MouseButton1Click instead of :MouseClick. MouseClick isn't a property of any GuiObject.