For some reason the “OtherHum” is my players name when sent through the server and “Custombox” is humanoid when also sent through server.
I have no idea why its doing it
ALSO this script is about an admin panel
(the script is very long so I’m just showing what I think is causing it)
local script (before the info is sent to the server)
ExecutionButton.Activated:Connect(function()
if walkspeedOn == true then
Errorlabel.Text = "Error checker:"
local Findplayer = game.Players:FindFirstChild(Targetbox.Text)
if Findplayer then
local OtherChar = workspace:FindFirstChild(Findplayer.Name)
local OtherHum = OtherChar:FindFirstChild("Humanoid")
if Custombox == nil then
Errorlabel.Text = "Error checker: Custom input empty"
else
RS.Commandremotes.WalkspeedRemote:FireServer(OtherHum, Custombox)
end
else
Errorlabel.Text = "Error checker: Player not found"
end
elseif jumppowerOn == true then
Errorlabel.Text = "Error checker:"
local Findplayer = game.Players:FindFirstChild(Targetbox.Text)
if Findplayer then
local OtherChar = workspace:FindFirstChild(Findplayer.Name)
local OtherHum = OtherChar:FindFirstChild("Humanoid")
if Custombox == nil then
Errorlabel.Text = "Error checker: Custom input empty"
else
RS.Commandremotes.JumppowerRemote:FireServer(OtherHum, Custombox)
end
else
Errorlabel.Text = "Error checker: Player not found"
end
else
Errorlabel.Text = "Error checker: Command not selected"
end
end)
the server script
local RS = game:GetService("ReplicatedStorage")
local Walkspeedremote = RS.Commandremotes.WalkspeedRemote
local Jumppowerremote = RS.Commandremotes.JumppowerRemote
Walkspeedremote.OnServerEvent:Connect(function(OtherHum, Custombox)
OtherHum.WalkSpeed = Custombox.Text
end)
Jumppowerremote.OnServerEvent:Connect(function(OtherHum, Custombox)
OtherHum.JumpPower = Custombox.Text
end)