I've tried to create a handcuff script, however my remote event does not appear to be firing.
Localscript code:
local UIS = game:GetService("UserInputService")
script.Parent.Equipped:Connect(function(Mouse)
UIS.InputBegan:Connect(function(input, GP)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if script.plr.Value == "" then
script.plr.Value = tostring(Mouse.Target.Parent.Name)
if Mouse.Target ~= nil then
if Mouse.Target.Parent:FindFirstChild("Humanoid") then
print("a")
print(script.plr.Value)
game:GetService("ReplicatedStorage").Handcuff:FireServer(script.plr.Value, "Cuff")
print("b")
end
end
else
end
end
end)
end)
Serverscript code:
game:GetService("ReplicatedStorage").Handcuff.OnServerEvent:Connect(function(plr,otherplr,state)
print("a")
print(plr)
print(otherplr)
print(state)
end)
Nothing in the serverscript is being ran.
