hello its me again. I have ran into a problem with remote functions and i don’t know how to fix it. The problem that i an facing is that the equip remote function wont pass.
script for invoking the remote function on the client
coroutine.wrap(function()
local pass = game.ReplicatedStorage.weaponRemotes.equip:InvokeServer(wepName)
if not pass then print('bruh') end
end)()
Server Script
remots:WaitForChild("equip").OnServerInvoke = function(plr, wepName)
print('1')
if players[plr.UserId].currentWeapon then return end
print('2')
print('3')
if not players[plr.UserId].weapons[wepName] then return end
print('4')
if not plr.Character then return end
print('5')
local weaponTable = players[plr.UserId]
-- we mark the current gun
weaponTable.currentWeapon = weaponTable.weapons[wepName]
print('jjjjj')
return true
end
again i am really sorry if this is worded poorly
this answer might already be on the devform but i am not sure what i am suppose to search