01 | script.Parent.MouseButton 1 Click:connect( function () |
02 | plr = script.Parent.Parent.Parent.Parent.Parent.Parent |
03 | theplayer = script.Parent.Parent.Name.Text |
04 | HR = plr.Name |
05 | reason = script.Parent.Parent.Reason.Text |
06 | if game.Players:FindFirstChild( 'theplayer' ) ~ = nil then |
07 |
08 | print ( "foundplayer" ) |
09 | theplayer.PlayerGui.Warning.Frame.Visible = true |
10 | theplayer.PlayerGui.Warning.Frame.Part 1. Text = "You have been given a warning by " ..HR.. ", if you continue to break the rules, you may be banned from the event" |
11 | theplayer.PlayerGui.Warning.Frame.Part 2. Text = "Reason for the warning: " ..reason |
12 | else |
13 | print ( "CouldntFindEm" ) |
14 |
15 | end |
16 |
17 | end ) |
Line 6
1 | if game.Players:FindFirstChild( 'theplayer' ) ~ = nil then |
you are looking for something named "theplayer" take out the 's and it will find something named what the variable theplayer is
01 | script.Parent.MouseButton 1 Click:connect( function () |
02 | plr = script.Parent.Parent.Parent.Parent.Parent.Parent |
03 | theplayer = script.Parent.Parent.Name |
04 | HR = plr.Name |
05 | reason = script.Parent.Parent.Reason.Text |
06 | if game.Players:findFirstChild(theplayer) ~ = nil then -- findFirstChild is not FindFirstChild. |
07 |
08 | print ( "foundplayer" ) |
09 | theplayer.PlayerGui.Warning.Frame.Visible = true |
10 | theplayer.PlayerGui.Warning.Frame.Part 1. Text = "You have been given a warning by " ..HR.. ", if you continue to break the rules, you may be banned from the event." -- Decided to add a period for good grammar |
11 | theplayer.PlayerGui.Warning.Frame.Part 2. Text = "Reason for the warning: " ..reason |
12 | else |
13 | print ( "Something" ) |
14 |
15 | end |
16 |
17 | end ) |
That should be about it from what I could see this might not work though.
1 | theplayer = script.Parent.Parent.Name |
Please post any scripts relevant to it because that's the most I could decipher just from that.