How do i make action bar?

You can write your topic however you want, but you need to answer these questions:

  1. 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

  1. What is the issue? Include screenshots / videos if possible!

I tried to make one but it doesnt work.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

There are no topics like that.

2 Likes

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

1 Like

sadly i name my places so badly that i cant remember which one had that

1 Like

Well then go and find it. It’s unlikely that people are gonna spoonfeed you here, especially since you have no code.

1 Like

But i dont know how to make local scripts that show gui when interacting with item.

1 Like

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.

1 Like

you mean i need to make 2 functions for when not visible and when visible?

1 Like

You can merge it into a single one, but two is fine.

1 Like

Fine… i will try to do it… but it probably wont work.

1 Like

but wait how to do it with a tool?

1 Like
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

something like this?

remote functions, pretty much and add like int values and stuff.

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

Hello!

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.

Hope I could help!

It did work the text appeared for 3 secunds.

wait i dont understand, do you want like a bar for something or just a bar that can be toggled?

But i have a question. How do i make the script know what item is currently interacted to make the text work?

just use remote events , charkut sss

How do i use remote functions?

read the edited post, pretty much u detect when player presses the ui and change the value of the bar through remote events.