Hello. I got a script that deactivates parts, but the problem isn't with that, it was with the script not passing the value of the arguments into the remote event
game:GetService("ReplicatedStorage"):FindFirstChild("PartDeactivator"):FireClient(game.Players:GetPlayerFromCharacter(hit.Parent),"activate")
so the 2nd argument is "activate"
game:GetService("ReplicatedStorage").TrussActivator.OnClientEvent:Connect(function(player,type)
print(type)
local trussToActivate = game.Workspace.Obby.Obstacles["12"].ActivatedTrusses:GetChildren()
if type == "activate" then
for i, truss in pairs(trussToActivate) do
if truss:IsA("TrussPart") and not truss:IsA("Script") then
wait(0.001)
truss.CanCollide = true
truss.Transparency = 0
end
end
elseif type == "deactivate" then
for i, truss in pairs(trussToActivate) do
if truss:IsA("TrussPart") and not truss:IsA("Script") then
wait(0.001)
truss.CanCollide = false
truss.Transparency = 1
end
end
end
end)
so the line that prints out type, it didn't print out "activate", it printed out "nil"
and because of that the rest of my script does not run
any idea why the value is nil? I really need help
thanks for your time and answers are greatly appreciated

2 comments
'type' is a built-in function that returns the type of the given value, and you named one of your variables 'type'. Consider alternatives, such as 'signalType' or 'stringType'.
@DeceptiveCaster , I changed the argument name to another name, yet it stills prints out "nil"