How would i fix this?
Client:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Remote = ReplicatedStorage:WaitForChild("TradeRequest")
script.Parent.MouseButton1Down:Connect(function()
if game.Players:FindFirstChild(script.Parent.Parent.Name) then
Remote:FireServer(script.Parent.Parent.Parent, game.Players.LocalPlayer)
wait(5)
else
warn("Error finding user"..script.Parent.Parent.Name.." in Players ⚠️")
wait(5)
end
end)
Server:
RS = game:GetService("ReplicatedStorage")
RS:WaitForChild("TradeRequest").OnServerEvent:Connect(function(RQed_Player, RQing_Player)
RS:WaitForChild("SendTradeNoti"):FireClient(game.Players:FindFirstChild(RQing_Player.Name), RQing_Player)
wait(1)
end)