what is this type of gui called, and how would I implement it into my game?
Its called a Message
It was the old way you would say Global Events, Hints, etc
local Message = Instance.new("Message")
This Object is now deprecated however
is there any way to basically modernize it?
sadly no,
The only thing you can change is its Text
You can make a status bar like what I did in my game
could you give me an example of what you mean?
basically all i need to know is if you can still use it for things like touching an object.
Instance + Properties
Message Documentation
Hint Documentation
@roastbeefdevourer42 The Proper way to set this up is:
local Message = Instance.new("Message", workspace)
Message.Text = "Hello!"
Additionally,
There is one more type called a Hint
Which is those Black Boxes you would see at the top of your Screen
local Hint = Instance.new("Hint", workspace)
Hint.Text = "Hi"
NOTE that Hint
is for some reason called Message
instead of its ClassName
which you Guessed it, is called: Hint
, a bit odd.
You could, however I would recommend using Frames for this if you want to keep up with newer games
How would I make it appear on the click or touch of a brick? I’ve tried experimenting with it and I’ve seen no results.
local Message = Instance.new("Message", workspace)
-- This Message wont be seen as it has no Text
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
Message.Text = "Wooosh"
end
end)
I tested on a random part
How would I make it function with a clicking property? I’m new to lua, sorry to bother you so much
local Message = Instance.new("Message", workspace)
local CD = script.Parent.ClickDetector
-- Create a ClickDetector before doing this
CD.MouseClick:Connect(function()
Message.Text = "Wooosh"
end)
This is old and should not be used for new work. Here’s the AdminSuite v1.37 notify function for a more modern alternative:
function notifyplayersystemmessage(msg, plrname, customTime)
local plr = game.Players:WaitForChild(plrname)
local gui = Instance.new("ScreenGui")
gui.IgnoreGuiInset=true
gui.ResetOnSpawn=false
local txt = Instance.new("TextLabel")
txt.TextColor3=Color3.fromRGB(255, 255, 255)
txt.Size=UDim2.fromScale(1, 1)
txt.BackgroundTransparency=0.5
txt.BackgroundColor3=Color3.new()
txt.Text=msg
txt.RichText = true
txt.Parent = gui
gui.Parent = plr.PlayerGui
game:GetService("Debris"):AddItem(gui, customTime or 6)
return txt --Return the TextLabel so it can be further modified by the user if needed.
end
Additionally, here are the properties to make an identical version of Message
with a simple TextLabel
:
Result:
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.