Cant i just use string values called ActionBar that will have the interaction text inside the tool?
preferably use int values, and substract how much you want when the ui is pressed
how do i make the action bar script know that something was interacted?
i just said it like 3 times, remote events
Change the Text
property of the TextLabel or TextButton.
but i will need to script a lot bc the remote event dont transfer description of the interacted item.
You don’t have to write everything in one script. BindableEvents or by using Modules you can have a function be reachable across multiple scripts.
Then in a script inside your Tool, you can check if the tool is equipped via Tool.Equipped and Tool.Unequipped and combine it with what I told you in my previous post.
Hope my answer could help further!
cringe, jk but remote events are easier, though you are correct.
Um but i dont know how to use module scripts.
then learn them,btw modul scripts arent necessary but they save time and lines
also he suggested using bindable events which is better
Like the guy above said, learn them.
Or use a Event System, with either RemoteEvents or BindableEvents which are, I think, in your case a little bit easier, though modules aren’t too hard either.
But its possible in module scripts to make it detect which tool was interacted?
Yes, yes it is. Please learn them, so you can answer these questions for yourself. It’ll also help you a load in the long run.
You probably need to learn basic scripting before you try to make any sort of game like this. Even that action bar is a stretch by the looks of it.
Module Scripts are not too hard to learn and Roblox has a great guide for them too. In very short. modules are storages for your values and functions. You could check inside a LocalScript if your Player interacted with a Tool and then execute a function inside a Module, which does the rest.
local action = {
["Pizza"] = {
["Text"] = "You eated a slice of pizza. It tastes great."
}
}
return action
this is what i need to do? wait how do i make the local script detect that the tool is a pizza and the text?
Like everyone’s recommended, learn basic scripting before you try and do any of this. The knowledge will all flow in time.
But i can use Roblox Generative AI.