Remote Event Not Firing

I have a local script that detects when a players level is more than the required exp needed:

local player = game.Players.LocalPlayer
local leaderstats = player:WaitForChild("leaderstats")
local exp = leaderstats:WaitForChild("Exp")
local reqexp = leaderstats:WaitForChild("RequiredExp")
local level = leaderstats:WaitForChild("Level")

player:WaitForChild("leaderstats").Exp.Changed:Connect(function(Changed)
	
	if exp.Value >= reqexp.Value then
		
		print("start")
		game:GetService("ReplicatedStorage"):WaitForChild("Changing"):FireServer(exp, level, reqexp)
		print("end")
		
	end
end)

Here is the script used to detect when the remote event is fired:

script.Parent.OnServerEvent:Connect(function(plr, exp, level, reqexp)
	
	print("Fired")
	
	local leaderstats = plr.leaderstats
		
	local aftermath = exp.Value - reqexp.Value
		
	exp.Value = aftermath
		
	level.Value += 1
		
	reqexp.Value += 250
	
end)

The ‘start’ and ‘end’ print statements from the Localscript fire, however, the ‘fired’ statement from the server script does not. Any help is appreciated :heart:

Server scripts do not run in Replicated Storage. (So you might wanna put the server script in ServerScriptService and change the path of the remote event)

I feel so stupid for a solution that simple :sweat_smile:
Thanks for your help :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.