I’m trying to make a global death message system for every servers.i started writing when i read the documentation.but then i got stuck on something.
script:
local DB = false
local DSS = game:GetService("DataStoreService"):GetDataStore("Ban")
game:GetService("Players").PlayerAdded:Connect(function(Plr)
local IsBanned = DSS:GetAsync(Plr.UserId)
if IsBanned then
Plr:Kick("A̷͖̳͊-̷̦͚̄A̸̱͊m̷̝͋ ̶̻́i̵͍͖͠ ̴͔͘l̶̟̓̓i̵̫͗͋v̷̛͇̱͊i̵͉͂͜͝n̶͍̓͊g̴̱̈́?̸̘͔͠ ̶͍̿o̶̱͎͂̿h̶̬̮͒̇ ̵͉́m̶̝͝y̷͙̙͘ ̴̣̻̑g̶̦̑o̷̭͊̽s̸͍̈́̿h̸̼͑.̶̟͊t̸̝͎̿h̸̯́ͅi̷̢̝͒s̸͇͎̉ ̸̡̝̀͋ĭ̸̪͎s̸̢̲̎͆.̵͎̆̃͜.̴͎̩̌.̵̡́ ̵̺̓n̴̲̈́o̵̤͆̋t̷͖̙̄ ̶̢̇̀c̵͕̈ỏ̷̫̿o̷̡͑́l̴̜̥̽͒.̵̜͆i̶̮̱̓-̶͈͉̔i̸͙̎ ̸̯̤͝w̸͇̓͜ḭ̶̾͘l̸̟̳̅̿l̸̝̉ ̵̘̗̈́̈́n̷͈̍e̴͇͌̓v̶̫̀ȇ̷͓͝r̴̩̓ ̸̯̩͋b̵̗͝e̴̜͉͝ ̷̧̍̒ö̷̱͕̅n̸̠̙͝ ̴͎̱̿̒t̵̩̘͘ḫ̸̒̀ȉ̷̖s̶̘͓̑̓ ̸̙͐̎g̶̡̀a̴͇̐-̶͇̫̓̉g̵̗̑̐a̶̼̅̚m̸̖̄͘ė̴̦͇̕ ̴̘̎͊ā̶͍-̶͕͊̓a̵̡̱͊͝g̴̦͑a̸̮̓̓i̴̠̽n̸̹̈́͝.̸̛̪̟͠")
end
end)
script.Parent.Touched:Connect(function(Hit)
if DB then
return
end
DB = true
if Hit and Hit.Parent and Hit.Parent:FindFirstChildWhichIsA("Humanoid") then
game:GetService("SoundService").Bonebreak:Play()
Hit.Parent.Humanoid.BreakJointsOnDeath = false
Hit.Parent.Humanoid.Health = 0
game:GetService("SoundService").Ambience:Destroy()
game:GetService("Players"):GetPlayerFromCharacter(Hit.Parent).PlayerGui.Death.Enabled = true
DSS:SetAsync(game:GetService("Players"):GetPlayerFromCharacter(Hit.Parent).UserId,true)
game:GetService("MessagingService"):PublishAsync("Vefat mesajı",{message = Hit.Parent.Name.." vefat etti.Geçmiş olsun :("})
game:GetService("MessagingService"):SubscribeAsync("Vefat mesajı",function(receiveddata)
local data = receiveddata.Data
end)
elseif Hit.Name == "Glass" then
DB = false
Hit:Destroy()
end
end)
game:GetService("Players").PlayerRemoving:Connect(function(Plr)
DSS:SetAsync(Plr.UserId,true)
end)
i got stuck when changing every servers players textlabel text.
can someone help me with that?