I'm not a very good scripter. But basically this is a warning system for a group I am in
Output:
17:22:59.630 - theplayer is not a valid member of Players
17:22:59.631 - Script 'Players.Player1.PlayerGui.HRWarn.Frame.Frame.TextButton.Scr', Line 6
17:22:59.632 - Stack End
17:22:59.633 - Disconnected event because of exception
Script:
script.Parent.MouseButton1Click:connect(function()
plr=script.Parent.Parent.Parent.Parent.Parent.Parent
theplayer = script.Parent.Parent.Name.Text
HR=plr.Name
reason = script.Parent.Parent.Reason.Text
if game.Players.theplayer==nil then
else
theplayer.PlayerGui.Warning.Frame.Visible=true
theplayer.PlayerGui.Warning.Frame.Part1.Text="You have been given a warning by "..HR..", if you continue to break the rules, you may be banned from the event"
theplayer.PlayerGui.Warning.Frame.Part2.Text="Reason for the warning: "..reason
end
end)

1 comment
woops, I forgot to paste the updated script. Namey was what "theplayer" is above, I just forgot to change it.