Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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:

player = game.Players.LocalPlayer
mouse = player:GetMouse()
explosionEvent = game.ReplicatedStorage.explosionEvent

player.Backpack.Remote.Equipped:Connect(function()
	mouse.Button1Down:Connect(function()
		if player.character.Remote then
			player.Character.Remote.sphere.BrickColor = BrickColor.new("Bright green")
			player.Character.Remote.sphere.Beep:Play()
			wait(.5)
			explosionEvent:FireServer()
			player.Character.Remote.sphere.BrickColor = BrickColor.new("Bright red")
		end
	end)
	mouse.Button2Down:Connect(function()
		if player.character.Remote then
			newPart = game.ReplicatedStorage.bomb:Clone()
			newPart.Parent = game.Workspace
			newPart.playersName.Value = game.Players.LocalPlayer.Name
		
			playerCframe = game.Players.LocalPlayer.Character.UpperTorso.CFrame
			playerLv = playerCframe.lookVector
			newPart.bomb.CFrame = playerCframe + (playerLv * Vector3.new(5,5,5))
		end
	end)
end)

script in the bomb:

explosionEvent = game.ReplicatedStorage.explosionEvent
explosionEvent.OnServerEvent:Connect(function(player)
	if player.Name == script.Parent.playersName then
		print("AAAAAA")
	end
end)

4 comments

0

what line is the error?i don't see you trying to send a remote event in your first script anywhere.

0

line 11

0

can you tell us what player.Character.Remote is?

0

the remote controller

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.