You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
Action bar is a title/text located at the very bottom of the screen it tells and describes what the player does it appears when the player for example eated/drinked/picked up/used something
here is an video that shows it
check timeline 0:59 and at the very bottom of the screen you will see action bar
What is the issue? Include screenshots / videos if possible!
I tried to make one but it doesnt work.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Show your broken script so that people can help you fix it. Are there any errors in the output? What part of it doesn’t work? Be more specific, we don’t know how your game is structured
Add a variable for when the player starts interacting. When this variable is set to true, show the gui. Set the variable to false when they stop interacting. When this variable is set to false, stop showing the gui.
local show = false
local action_bar = script.Parent.Text
local function showORhide(text)
if show == false then
text.Text = "Show"
print(text.Text)
show = true
else
text.Text = "Hide"
print(text.Text)
show = false
end
end
local function appear()
if show == false then
showORhide(action_bar)
wait(3)
showORhide(action_bar)
end
end
local show = false
local action_bar = script.Parent.Text
local function showORhide(text)
if show == false then
text.Text = "Show"
text.Visible = true
print(text.Text)
show = true
else
text.Text = "Hide"
text.Visible = false
print(text.Text)
show = false
end
end
local function appear()
if show == false then
showORhide(action_bar)
wait(3)
showORhide(action_bar)
end
end
wait(5)
appear()
i did some small changes like changing visible to false and true and tested it
You can try your script out yourself by just calling your function appear() in Playtest, but I think it should work?
Most GUI Elements have a Visible Property, which you could use to show or hide it. A GUI Element can be reached, if you have it in StarterGUI, by using game:GetService("StarterGui") and then collect your Element via the Hierarchy Path.
You can use Tool.Activated to send out a function when a tool is interacted with or, if you want a custom key, use UserInputService.InputBegan and check there if you have your tool equipped and the key pressed.