I might as well give you guys the whole thing:
function SendMessageViaWifi()
local Player = script.Parent.Parent.Parent.Parent.Parent.Parent.Character
local Tower = Workspace:findFirstChild("WifiTower")
local Receiver = script.Parent.Parent.NameInput.Text
local Search = game.Players:findFirstChild(Receiver)
if (Player.Torso.Position - Tower.Blinker.Position).Magnitude <= Tower.SignalStrength.Value and (Search.Character.Torso.Position - Tower.Blinker.Position).Magnitude <= Tower.SignalStrength.Value then
local Sender = script.Parent.Parent.Parent.Parent.Parent.Parent
local Message = script.Parent.Parent.MessageInput.Text
Search.PlayerGui.Gadgets.Tray.Messenger.MessageSlot.Text = Message.." From: "..Sender
repeat wait(.5)
Search.PlayerGUI.Gadgets.Tray.Messenger.Inbox.BackgroundColor3 = Color3.new(255,0,0)
wait(.5)
Search.PlayerGUI.Gadgets.Tray.Messenger.Inbox.BackgroundColor3 = Color3.new(255,255,255)
until script.Parent.Parent.Inbox.Selected == true
else
script.Parent.Parent.Notification.Visible = true
end
end
script.Parent.MouseButton1Down:connect(SendMessageViaWifi)
Alright. No more snips. :D |