Remote event doesn't fire to client

module script (everything works)

local module = {}

function module.notify(player, text)
	
	local notiRemote = game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("Notify")
	
	notiRemote:FireClient(player, text)
	
end

return module

local script:

local notiRemote = game:GetService("ReplicatedStorage"):WaitForChild("Remotes"):WaitForChild("Notify")
local notification = game:GetService("ReplicatedStorage"):WaitForChild("UIElements"):WaitForChild("Clonables"):WaitForChild("notification")
local notiUi = script.Parent:WaitForChild("notification")
local sound = game:GetService("SoundService"):WaitForChild("notification")


notiRemote.OnClientEvent:Connect(function(text)
	
	local newNotification = notification:Clone()

	newNotification.Parent = notiUi
	newNotification.Text = text
	
	sound:Play()
	
end)
  1. Make sure the parameters passed are valid (player isn’t nil).
  1. You have a lot of :WaitForChild() setup. Make sure none of those sections are permanently stuck waiting because of a mispelling or wrong parent. You can use print statements for it.

  2. Check output for any errors.

everything looks fine, but the local script doesnt get triggered by the remote

nvm i accidentaly deleted a folder in replicated storage that looped the wait for child in the line 2 of the localscript

2 Likes

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