01 | local event = game.ReplicatedStorage.Event_Storage.Battle_Player |
02 | local event 1 = game.ReplicatedStorage.Event_Storage.BP_Client |
03 |
04 | event.OnServerEvent:Connect( function (player,plr) |
05 | for i,v in pairs (game.Players:GetChildren()) do |
06 | if v.Name = = plr.Name then |
07 | local newPlr = game.Players:FindFirstChild(plr.Name) |
08 | warn(newPlr) |
09 | event 1 :FireClient(player, newPlr) |
10 | warn( "Found " ..plr.Name) |
11 | end |
12 | end |
13 | end ) |
newPlr nils out
01 | local event = game.ReplicatedStorage.Event_Storage.BP_Client |
02 |
03 | event.OnClientEvent:Connect( function (player, plr) |
04 | warn(plr) |
05 | if plr.Name = = game.Players.LocalPlayer.Name then |
06 | warn( "Battle Request Inbound For " ..plr.Name) |
07 | script.Battle_Inbound.Enabled = true |
08 | script.Battle_Inbound.Controls.PlayerName.Text = player.Name |
09 | script.Battle_Inbound.Controls.PlayerImage = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=" ..player.Name |
10 | end |
11 | end ) |