script.Parent.OnClick.OnClientEvent:Connect(function(plr)
script.Parent.ClickSound:Play()
local hp = tonumber(script.Parent.Parent.Health.TextBox.Text)
local def = tonumber(script.Parent.Parent.Defense.TextBox.Text)
local tshirt = tonumber(script.Parent.Parent["T-Shirt"].TextBox.Text)
task.wait()
script.Parent.TransferStuff:FireServer(plr, hp, def, tshirt)
end)
Could you give me the hierarchy in the explorer, or a video? I feel like there’s something I either don’t understand or missing because I don’t completely understand what the issue is.
script.Parent.MouseButton1Click:Connect(function()
local plr = game.Players.LocalPlayer
local something = nil
script.Parent.ClickSound:Play()
local hp = tonumber(script.Parent.Parent.Health.TextBox.Text)
local def = tonumber(script.Parent.Parent.Defense.TextBox.Text)
local tshirt = tonumber(script.Parent.Parent["T-Shirt"].TextBox.Text)
task.wait()
script.Parent.TransferStuff:FireServer(plr, hp, def, tshirt, something)
end)
Why are you sending the player argument when firing the event? It’s sent automatically, so in your case on the OnServerEvent connection the plr and hp parameters are both the same player firing the remote