Remote event doesn't work

Hi devs!

I have a problem with a RemoteEvent. I can fire it but it seems to not being receiving it for some reason.

This is the explorer:

image

And these the scripts:

  • Local script
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()

Mouse.Button1Down:Connect(function()
	if Player.Character:FindFirstChild("Bomb") then
		script.ThrowRE:FireServer(Mouse.Hit.Position)
		print("Sent!")
	end
end)
  • Server script:
local RagdollModule = require(game.ReplicatedStorage:WaitForChild("MainModule"))

script.Parent.OnServerEvent:Connect(function(Player, MouseHitPosition)
	
	print("Received!")
	
	local Bomb = Player.Character:WaitForChild("Bomb").Handle -- It means the Model, the parent is the Tool
	local StartPosition = Bomb.Position
	local TargetPosition = MouseHitPosition
	local Velocity = 10
	
	local LookDirection = CFrame.lookAt(StartPosition,TargetPosition).LookVector
	local VelocityVector = LookDirection * Velocity

	Bomb.Parent.Parent = game.Workspace
	Bomb:ApplyImpulse(VelocityVector)

	wait(5)

	Bomb:WaitForChild("ProximityPrompt").Enabled = true
end)

When i click with the bomb equipped it prints Sent but it doesn’t prints Received

Any help?

Thanks

Server script inside PlayerScripts does not run.

That’s strange, because i always do that and it works perfectly…

I don’t know I tested it before using print didn’t run.

Uhh nvm. i changed it and it works. thanks

Server scripts inside the ‘StarterCharacterScripts’ container will run when cloned into character models, server scripts inside the ‘StarterPlayerScripts’ container will not run when cloned into player scripts folders.