Warn command error

So basically I have a simple warn command that runs on a remote and basically what im trying to have it do is clone the notification GUI from replicatedstorage and put that on the selected player’s playergui

But its not cloning. All it’s doing is moving the original GUI in replicatedstorage to the players playergui

code:

WarnEvent.OnServerEvent:Connect(function(player, WarnPlayer)
	local PlayerWarn = game.Players:FindFirstChild(WarnPlayer)
	if admins[player.Name] and PlayerWarn then
		local noti = game:GetService("ReplicatedStorage").Notification
		noti:Clone()
		noti.Parent = PlayerWarn.PlayerGui
		
		
	end
end)

This is because you simply did “noti:Clone()” and then moved noti to PlayerGui. Note that even after you do “note:Clone(),” “noti” is still referring to the original object. Instead, you will need to do something like “noti:Clone().Parent = PlayerWarm.PlayerGui”

1 Like