This silly error wont go at all

The error is attempted to call a nil value.

require(game.ReplicatedStorage.cmds).NotifyPlayer("e") -- the line code

local module = {}

function module.NotifyPlayer(player,text)
	local msg = script.Notification:Clone()
	local plr = player
	if plr==nil then warn("DUDE YOUR SO SILLY THIS ISNT A REAL PLAYER SMH SMH SMH SMH") return end
	
	msg.Parent = plr:WaitForChild("PlayerGui").list.Notifs
	wait(5)
	local t=game:GetService("TweenService"):Create(msg,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0),{TextTransparency = 1}) t:Play()
	t.Completed:Wait()
	msg:Destroy()
end

return module

Any help is appreciated!

You are only parsing one argument which is “e” You haven’t parsed a player variable

require(game.ReplicatedStorage.cmds).NotifyPlayer("Jukeist","e")

Runned the same like this.

You’re passing through a string value and then trying to index that string value

Example of getting player instance:

local Player = game:GetService("Players").LocalPlayer
local module = {}

function module.NotifyPlayer(player,text)
	local msg = script.Notification:Clone()
	local plr = player
	if plr==nil then warn("DUDE YOUR SO SILLY THIS ISNT A REAL PLAYER SMH SMH SMH SMH") return end
	
	msg.Parent = game.Players[plr]:WaitForChild("PlayerGui").list.Notifs
	task.wait(5)
	local t=game:GetService("TweenService"):Create(msg,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.In,0,false,0),{TextTransparency = 1}) t:Play()
	t.Completed:Wait()
	msg:Destroy()
end

return module

Fixed but the error persists.

Any specific line of the error? It’s most likely your explorer layout then since theirs no problem with the code being shown.

Found something weird, it works in game finally but is mighty broken on studio.
???

If it’s erroring it’s most likely because you’re running the code before one of instances has loaded, e.g playergui / replicated storage , add :WaitForChilds(), This issue can also happen ingame if a player has a “laggy” load

The error instantly pops up in studio attempt to call a nil value and it isnt a waitforchild error.