I get the following error when running these scripts: "cannot resume non-suspended coroutine"
its a remote function. the server script reads
local press = Instance.new("RemoteFunction") press.Parent = script.Parent press.Name = "FetchMousePressed" script.Parent.Equipped:wait() player = game.Players:GetPlayerFromCharacter(script.Parent.Parent) local buttonpressed = function() return press:InvokeClient(player) end
and the local script, which does the work, reads
local Mouse = game.Players.LocalPlayer:GetMouse() script.Parent:WaitForChild("FetchMousePressed").OnClientInvoke = function() Mouse.Button1Down:connect(function() local Fire = true Mouse.Button1Up:connect(function() Fire = false end) return Fire end) end
any ideas?