Why is my remote event not being received?
I have a bomb in replicated storage, and a remote controller in starter pack. I have a local script in the remote controller. The local script clones the bomb and places the clone in front of me when I right click. That part works properly. The same script also will fire a remote event when I left click. I have a script in the bomb. The bomb should receive the remote event and explode, but it doesn't. Why doesn't the bomb receive the remote event?
local script in the remote controller:
01 | player = game.Players.LocalPlayer |
02 | mouse = player:GetMouse() |
03 | explosionEvent = game.ReplicatedStorage.explosionEvent |
05 | player.Backpack.Remote.Equipped:Connect( function () |
06 | mouse.Button 1 Down:Connect( function () |
07 | if player.character.Remote then |
08 | player.Character.Remote.sphere.BrickColor = BrickColor.new( "Bright green" ) |
09 | player.Character.Remote.sphere.Beep:Play() |
11 | explosionEvent:FireServer() |
12 | player.Character.Remote.sphere.BrickColor = BrickColor.new( "Bright red" ) |
15 | mouse.Button 2 Down:Connect( function () |
16 | if player.character.Remote then |
17 | newPart = game.ReplicatedStorage.bomb:Clone() |
18 | newPart.Parent = game.Workspace |
19 | newPart.playersName.Value = game.Players.LocalPlayer.Name |
21 | playerCframe = game.Players.LocalPlayer.Character.UpperTorso.CFrame |
22 | playerLv = playerCframe.lookVector |
23 | newPart.bomb.CFrame = playerCframe + (playerLv * Vector 3. new( 5 , 5 , 5 )) |
script in the bomb:
1 | explosionEvent = game.ReplicatedStorage.explosionEvent |
2 | explosionEvent.OnServerEvent:Connect( function (player) |
3 | if player.Name = = script.Parent.playersName then |