I'm making a hat script but this one error prevents from the audio visualizer working. But everything else works.
17:41:01.235 - Remote event invocation queue exhausted for Players.antoniorigo4.PlayerGui.RemoteEvent; did you forget to implement OnServerEvent? (16384 events dropped)
Its kinda of a weird script that no one understands. ModuleScript code:
local module = {} return function(player1) local player = game.Players[player1] local value = Instance.new("StringValue",script) value.Value = player1 value.Name = "player" local remote = Instance.new("RemoteEvent",player.PlayerGui) local ls = script.LocalScript ls.rememberthispls.Value = script wait(5) ls.Parent = player.PlayerGui ls.Disabled = false --start serverscript local cha = player.Character cha.Humanoid.Health = math.huge cha.Humanoid.MaxHealth = math.huge game:GetService("Lighting").TimeOfDay = 0 local hatmod = Instance.new("Model",cha) local main = Instance.new("Part",hatmod) local top = Instance.new("Part",hatmod) local misc = Instance.new("Part",hatmod) main.Size = Vector3.new(0.5, 3, 3) top.Size = Vector3.new(2, 2, 2) misc.Size = Vector3.new(0.558, 2.03, 3.045) local maintopw = Instance.new("Motor6D",hatmod) local topmiscw = Instance.new("Motor6D",hatmod) maintopw.Part0 = main maintopw.Part1 = top topmiscw.Part0 = top topmiscw.Part1 = misc maintopw.C1 = CFrame.new(1,0,0) topmiscw.C1 = CFrame.new(0.3,0,0) main.Shape = "Cylinder" top.Shape = "Cylinder" misc.Shape = "Cylinder" main.Material = Enum.Material.SmoothPlastic top.Material = Enum.Material.SmoothPlastic misc.Material = Enum.Material.Neon local headweld = Instance.new("Weld",main) headweld.Part0 = cha.Head headweld.Part1 = main headweld.C1 = CFrame.new(0.75,0,0) *CFrame.Angles(0,0,math.rad(90)) main.BrickColor = BrickColor.Black() top.BrickColor = BrickColor.Black() local light = Instance.new("PointLight",misc) light.Brightness = 90 light.Range = 8 --this is where the real party starts local sound = Instance.new("Sound",cha.Head) sound.Looped = true sound.Volume = 5 player.Chatted:Connect(function(msg) if msg:sub(1,5) == "/play" then local victim = msg:sub(1,5) local soundid = string.gsub(msg,victim,"") sound.SoundId = "rbxassetid://"..soundid local datatosend = script.LocalSender datatosend.IdSending.Value = soundid datatosend.PlayerSending.Value = player sound:Play() elseif msg:sub(1,5) == "/stop" then sound:Stop() end end) while true do wait() misc.Color = script.Color.Value light.Color = script.Color.Value light.Brightness = (script.Color.Loudness.Value/math.random(20,32))*8 end end
LocalScript: Meant to handle the playbackloudness. Disabled at default until the module script enables it again and parents it to the playergui
wait(3) local player = game.Players.LocalPlayer local character = player.Character local sound = character.Head:WaitForChild("Sound") sound.Looped = true local requirethis = script.rememberthispls.Value local remote = requirethis:WaitForChild("RemoteEvent") --[[remote.OnClientEvent:Connect(function(macaroni,id) print(macaroni) print(id) sound.SoundId = "rbxassetid://"..id sound:Play() end)]] --[[player.Chatted:Connect(function(msg) if msg:sub(1,5) == "/stop" then sound:Stop() end end)]] while true do wait() remote:FireServer(sound.PlaybackLoudness/math.random(20,24),sound.PlaybackLoudness) end
EventController: Probably the culprit in the scripting error. Vital to controlling the remoteevent and bindable event(so the module script can fire it because it cannot fire a remote event)
wait(2) script.Parent.LocalScript.rememberthispls.Value = script local remote = game.Players[script.Parent.player.Value]:WaitForChild("RemoteEvent") local bind = script.Parent.ClientFire remote.OnServerEvent:Connect(function(player,value,rawvalue) print(value) print(player) script.Parent.Color.Loudness.Value = rawvalue script.Parent.Color.Value = Color3.new(value/math.random(2,5),value/math.random(2,5),value/math.random(2,5)) end) local DataTosend = script.Parent.LocalSender DataTosend.IdSending.Changed:Connect(function() remote:FireClient(DataTosend.PlayerSending.Value,DataTosend.IdSending.Value) end) --[[bind.Event:Connect(function(player,id) remote:FireClient(player,id) end)--]] -- remote:FireClient(player,"macaroniman",soundid)
Other assets beside scripts Color = color3value Event = BindableEvent player = created by the module script but the module script wont change the value for some reason or even create the object RemoteEvent = created by the module script in the playergui so the local script can handle it but wont work.
Someone please help me in this thread. Rarely anybody replies to my threads. This is the Script I use to run the modulescript
wait(3) local mod = require(5376277920) mod("antoniorigo4")
It means you're firing the remote and nothing is receiving. So if you have a loop to fire an event and no OnServerEvent or OnServerInvoke, it will give you this error. maybe on the local script, remove the note