I have a Remote Event error in my script, How to fix it?
Asked by
4 years ago Edited 4 years ago
I'm making a hat script but this one error prevents from the audio visualizer working.
But everything else works.
1 | 17 : 41 : 01.235 - Remote event invocation queue exhausted for Players.antoniorigo 4. PlayerGui.RemoteEvent; did you forget to implement OnServerEvent? ( 16384 events dropped) |
Its kinda of a weird script that no one understands.
ModuleScript code:
02 | return function (player 1 ) |
03 | local player = game.Players [ player 1 ] |
04 | local value = Instance.new( "StringValue" ,script) |
07 | local remote = Instance.new( "RemoteEvent" ,player.PlayerGui) |
08 | local ls = script.LocalScript |
09 | ls.rememberthispls.Value = script |
11 | ls.Parent = player.PlayerGui |
14 | local cha = player.Character |
15 | cha.Humanoid.Health = math.huge |
16 | cha.Humanoid.MaxHealth = math.huge |
17 | game:GetService( "Lighting" ).TimeOfDay = 0 |
18 | local hatmod = Instance.new( "Model" ,cha) |
19 | local main = Instance.new( "Part" ,hatmod) |
20 | local top = Instance.new( "Part" ,hatmod) |
21 | local misc = Instance.new( "Part" ,hatmod) |
23 | main.Size = Vector 3. new( 0.5 , 3 , 3 ) |
24 | top.Size = Vector 3. new( 2 , 2 , 2 ) |
25 | misc.Size = Vector 3. new( 0.558 , 2.03 , 3.045 ) |
27 | local maintopw = Instance.new( "Motor6D" ,hatmod) |
28 | local topmiscw = Instance.new( "Motor6D" ,hatmod) |
37 | maintopw.C 1 = CFrame.new( 1 , 0 , 0 ) |
38 | topmiscw.C 1 = CFrame.new( 0.3 , 0 , 0 ) |
40 | main.Shape = "Cylinder" |
42 | misc.Shape = "Cylinder" |
43 | main.Material = Enum.Material.SmoothPlastic |
44 | top.Material = Enum.Material.SmoothPlastic |
45 | misc.Material = Enum.Material.Neon |
47 | local headweld = Instance.new( "Weld" ,main) |
48 | headweld.Part 0 = cha.Head |
50 | headweld.C 1 = CFrame.new( 0.75 , 0 , 0 ) *CFrame.Angles( 0 , 0 ,math.rad( 90 )) |
52 | main.BrickColor = BrickColor.Black() |
53 | top.BrickColor = BrickColor.Black() |
54 | local light = Instance.new( "PointLight" ,misc) |
58 | local sound = Instance.new( "Sound" ,cha.Head) |
62 | player.Chatted:Connect( function (msg) |
63 | if msg:sub( 1 , 5 ) = = "/play" then |
64 | local victim = msg:sub( 1 , 5 ) |
65 | local soundid = string.gsub(msg,victim, "" ) |
67 | local datatosend = script.LocalSender |
68 | datatosend.IdSending.Value = soundid |
69 | datatosend.PlayerSending.Value = player |
72 | elseif msg:sub( 1 , 5 ) = = "/stop" then |
77 | misc.Color = script.Color.Value |
78 | light.Color = script.Color.Value |
79 | light.Brightness = (script.Color.Loudness.Value/math.random( 20 , 32 ))* 8 |
LocalScript: Meant to handle the playbackloudness. Disabled at default until the module script enables it again and parents it to the playergui
02 | local player = game.Players.LocalPlayer |
03 | local character = player.Character |
04 | local sound = character.Head:WaitForChild( "Sound" ) |
06 | local requirethis = script.rememberthispls.Value |
07 | local remote = requirethis:WaitForChild( "RemoteEvent" ) |
22 | remote:FireServer(sound.PlaybackLoudness/math.random( 20 , 24 ),sound.PlaybackLoudness) |
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)
02 | script.Parent.LocalScript.rememberthispls.Value = script |
03 | local remote = game.Players [ script.Parent.player.Value ] :WaitForChild( "RemoteEvent" ) |
04 | local bind = script.Parent.ClientFire |
05 | remote.OnServerEvent:Connect( function (player,value,rawvalue) |
08 | script.Parent.Color.Loudness.Value = rawvalue |
09 | script.Parent.Color.Value = Color 3. new(value/math.random( 2 , 5 ),value/math.random( 2 , 5 ),value/math.random( 2 , 5 )) |
12 | local DataTosend = script.Parent.LocalSender |
13 | DataTosend.IdSending.Changed:Connect( function () |
14 | remote:FireClient(DataTosend.PlayerSending.Value,DataTosend.IdSending.Value) |
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
2 | local mod = require( 5376277920 ) mod( "antoniorigo4" ) |