Why is my RemoteEvent not firing?
Howdy all!
I consider myself a slightly better than average scripter, but I'm completely stumped at this. I'm genuinely confused if I'm forgetting something. I've got a typical LocalScript that waits for a .touched
event to run a :FireServer()
on an event. I've attempted to print debug the script and it seems that the function runs UP TO the :FireServer()
.
Here's the local script that fires the server. The RemoteEvent is named "cleanEvent" and is located in the ReplicatedStorage.
03 | if x.Name = = "SpillPart" then |
05 | game.ReplicatedStorage.cleanEvent:FireServer(x) |
06 | elseif x.Name = = "MessPart" then |
08 | game.ReplicatedStorage.cleanEvent:FireServer(x) |
12 | script.Parent.Touched:Connect(onTouch) |
Here is the Script itself.
01 | game.ReplicatedStorage.cleanEvent.OnServerEvent:connect( function (plr, Part) |
02 | print ( "Received Word" ) |
03 | if Part.Name = = "MessPart" then |
04 | print ( "Categorized as Mess" ) |
05 | [ Insert Rest of Script ] |
06 | elseif Part.Name = = "SpillPart" then |
07 | print ( "Categorized as Spill" ) |
08 | [ Insert Rest of Script ] |
I appreciate any and all help! Thanks!