Why won't my script recognize the local player?
Ok so to be brief. I am scripting a game where someone is selected to be the leader of a mini game and the leader is given a GUI and in the textbox they can type in a players name and send an air drop to them. The GUI is working fine and the tween event for the airdrop is perfectly fine, but the problem is that when I type in a players name into the textbox and click send, the server doesn't recognize the players name and completely halts the script. Nothing in the "output" is described as being an error so I am just lost. Please help.
01 | game.ReplicatedStorage.sendgun.OnServerEvent:Connect( function () |
02 | local val = script.Parent.TextBox.Value.Value |
03 | local text = script.Parent.TextBox |
05 | local plr = game.Workspace:FindFirstChild(val) |
06 | local val 2 = script.Parent.dis.Value.Value |
07 | local text 2 = script.Parent.dis |
09 | if plr and plr:FindFirstChild( "Humanoid" ) then |