There's not much to explain here, I don't think. The remoteevent is parented to a gui, but there's no problem with that because it still fires. The Ragdoll BoolValue is changed from client, and the value from client is sent to remoteevent, no problem with that either. But why does it return as player name?
Note: I've also tried sending two arguments, Player and bool, but there's no change with that because they both return as player name.
Localscript:
local c_StandGyro
ValueGui.Ragdoll.Changed:Connect(function()
ValueGui.RagdollEvent:FireServer(ValueGui.Ragdoll[v])
if ValueGui.Ragdoll[v] == true then
c_StandGyro = Root.StandGyro:Clone()
Root.StandGyro:Destroy()
Humanoid.Sit = true
else
c_StandGyro.Parent = Root
Humanoid.Sit = false
end
end)
ValueGui.Ragdoll[v] is a BoolValue as you can see. I've sent it through FireServer(), and it's somehow returning as the players name.
Script:
script.Parent.RagdollEvent.OnServerEvent:Connect(function(val)
print(val)
local reverseval
if val == true then
reverseval = false
else
reverseval = true
end
Character.FakeLArm.CanCollide = val
Character.FakeLLeg.CanCollide = val
Character.FakeRArm.CanCollide = val
Character.FakeRLeg.CanCollide = val
Torso["Left Hip"].Enabled = reverseval
Torso["Left Shoulder"].Enabled = reverseval
Torso["Right Hip"].Enabled = reverseval
Torso["Right Shoulder"].Enabled = reverseval
end)
The character and player has already been defined in the server script, its parented to a gui. Any help is appreciated, thanks.

1 comment
This has nothing to do with your question since you've already got an answer. But you can also do: local reverseval = not val