#slight problem with displaysystemmessage
1 messages · Page 1 of 1 (latest)
Can you show it
local prefix = "[Server]"
local plr = game.Players.LocalPlayer
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
do
message = " death"
game.TextChatService.TextChannels. RBXGeneral: DisplaySystemMessage(prefix..message)
end
if hum.Health == 0 then
print(message)
end
Wait a minute
like the message is creating immediately
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local message = " death"
hum.Died:Connect(function()
print(message)
game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage(prefix..message)
end)
It should look like this```
or if u just want the print like this
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local message = " death"
hum.Died:Connect(function()
print(message)
end)```
thank you