I am trying to make a shop that is like in Ninja Legends and games like that, but I have 0 clue what to attempt first. I am trying to make it so it is easy to make new items, but I am lost. I don’t know how to save it, and also I don’t know how to make it function. Can someone tell me how I would do this?
Since you seem like a beginner totally confused, I recommend you check out a tutorial on Youtube. Shop Gui’s are a pretty time consuming and complex task for a beginner. I recommend this one: https://www.youtube.com/watch?v=PgiVsm913Es
Im fine with most of this, but I don’t know how I would make it easier to add tools to the shop, such as a simple addition to a table. Sorry I didnt clarify
EDIT: I am not good at tables by the way. I never could find out how to understand them. But what I meant is i can add a simple tool to a table, with like the name and the price, and it would make a new button in the shop.
This isn’t exactly what I meant. Sorry i didnt clarify. I meant like making a shop out of tables, so I can easily make a new button in the shop just by adding a tool’s name and the price to a table.
Oh, that’s pretty simple. Instead of using a table, you could use a for loop to iterate over all items you want, and display each of them.
Some base code:
for _, item in pairs(ItemsFolder:GetChildren()) do
local template = script.Parent.Template
local newtemplate:Clone()
newtemplate.ItemLabel.Text = item.Name
etc…
newtemplate.MouseButton1Click:Connect(function()
– buy item stuff
end)
end
I have never used tables for something like this, and I wouldn’t try to.
Oh! Thank you. I will try it out now and tell you the result.
Hi! I tried it, but it didn’t seem to do anything.
local template = script.Parent.Template
local newtemp = template:Clone()
local price = newtemp.Price
for _, item in pairs(game.ReplicatedFirst:WaitForChild("Tools"):GetChildren()) do
newtemp.Visible = true
newtemp.Text = item.Name
newtemp.Name = item.Name
price.Text = item.Price.Value
end
I made template visible=false, but I cant see any buttons.
EDIT: Yes, I have UI Grid Layout. Also no errors in output
You need to parent the newTemp into the frame I think.
For that sort of game I use this kit and YouTube just look up “How to make a ninja legends game on Roblox” or “How to make a saber simulator game on Roblox” and you should a bunch of tutorials relating to that sort of simulator and how to make them. Hope this helped!..