Gotcha. I’ll DM you! ^^
Right, I think I’ve misunderstood. - let me help you.
So, if you want it so when a player joins a game we’ll need to edit the Essentials Code
. So, first you need to make sure you have the BAE 2.0 MainModule
. Which, if you don’t have already you can find it here.
(please note- this is not the original. this is a trusted source that fixed it, but if you’d rather have the original feel free.)
Amazing, now we’ve done that lets get to editing!
First, make sure that the game is published, you have HTTPS requests on and your script is placed in ServerScriptService
.
Now, open the Essentials Code
(which is found under Basic Admin Essentials 2.0 -> MainModule -> Components -> Essentials Code
).
Now, paste the following code at line 1984:
local function sendNotif(Title,Desc,Data)
spawn(function()
local notificationContainer = baseClip:WaitForChild('Container')
local Notification = notificationContainer:WaitForChild('Template')
local notifClone = Notification:Clone()
local notifInner = notifClone:WaitForChild('Inner')
local notifControls = notifInner:WaitForChild('Controls')
local notifTitle = notifControls.Decoration:WaitForChild('Title')
local notifExit = notifControls:WaitForChild('Exit')
local notifOpen = notifInner:WaitForChild('Open')
local notifDesc = notifInner:WaitForChild('Desc')
notifClone.Name = 'Notif Clone'
notifClone.Visible = true
notifClone.Parent = notificationContainer
notifTitle.Text = Title
notifDesc.Text = Desc
local receiveSound = Instance.new('Sound',Workspace.CurrentCamera)
receiveSound.Name = 'Notification'
receiveSound.SoundId = 'rbxassetid://255881176'
receiveSound.Volume = 1
receiveSound.Pitch = 1
receiveSound.PlayOnRemove = true
receiveSound:Destroy()
notifClone.Position = UDim2.new(0,0,1,0)
notifInner.Position = UDim2.new(0,0,1,0)
notifInner:TweenPosition(UDim2.new(0,0,0,0),'Out','Quint',0.3,true)
if Data[5] then
local Tag = Instance.new('StringValue',notifClone)
Tag.Name = "Tag"
Tag.Value = Data[5]
end
local exitConnection
exitConnection = notifExit.MouseButton1Click:connect(function()
exitConnection:Disconnect()
if Data[5] then
fireServer("Notification Transfer",{"Complete Message",Data[5]})
end
for a,b in pairs(Stacks.Notifs) do
if b == notifClone then
--table.remove(Stacks.Notifs,a)
end
end
--notifClone:Destroy()
figureNotifs(Stacks.Notifs,notificationContainer)
end)
local openConnection
openConnection = notifOpen.MouseButton1Click:connect(function()
openConnection:Disconnect()
fireServer('Notification Transfer',Data)
for a,b in pairs(Stacks.Notifs) do
if b == notifClone then
table.remove(Stacks.Notifs,a)
end
end
notifClone:Destroy()
figureNotifs(Stacks.Notifs,notificationContainer)
end)
table.insert(Stacks.Notifs,notifClone)
figureNotifs(Stacks.Notifs,notificationContainer)
end)
end
local layoutConnection
Done that? Fantastic, now scroll down to the very end of the code and input the folowing:
wait(0.0001)
sendNotif('New Message','Click for more details..',{'clear'})
This will make it so a notification will appear when you join the game. Of course, edit the text to your liking.
As you can see, when I join the message appears for me only.
Now, opening a PM through the click of the Notif
is much, much harder to do. So, if you would like help on that then please DM me and I will assist you!
If this helped you, please mark this as a solution!
To add on, if you would like a custom PM that is much easier to set up, once again please DM me.
Hi! I was looking for a Custom PM, the code you provided me was actually the one I was currently using lol. I have DM’ed you.
Hello! I can help you with this, I scripted this in my game, DM me on Discord, my username is gamekanaalyt, you can also DM me here.
Sure, I’ll DM you in a second.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.