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.

1 comment
please use a code block