Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my remote event not being received?

Asked by 4 years ago

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:

01player = game.Players.LocalPlayer
02mouse = player:GetMouse()
03explosionEvent = game.ReplicatedStorage.explosionEvent
04 
05player.Backpack.Remote.Equipped:Connect(function()
06    mouse.Button1Down: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()
10            wait(.5)
11            explosionEvent:FireServer()
12            player.Character.Remote.sphere.BrickColor = BrickColor.new("Bright red")
13        end
14    end)
15    mouse.Button2Down:Connect(function()
View all 26 lines...

script in the bomb:

1explosionEvent = game.ReplicatedStorage.explosionEvent
2explosionEvent.OnServerEvent:Connect(function(player)
3    if player.Name == script.Parent.playersName then
4        print("AAAAAA")
5    end
6end)
0
what line is the error?i don't see you trying to send a remote event in your first script anywhere. dibblydubblydoo 45 — 4y
0
line 11 robertandre 35 — 4y
0
can you tell us what player.Character.Remote is? dibblydubblydoo 45 — 4y
0
the remote controller robertandre 35 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

I created the bomb on a local script, so it did not exist in the server. I had to have the bomb created in the server.

Ad

Answer this question