So bassically I wrote out a script that would make it so any new tool that I wanted in my gui would show as a frame on my GUI everytime I put in a new tool. But for some reason the script looks correct but no new frames are showing up on my GUI, can someone please help me out? I'm seeing no errors in my output.
Heres the script:
local folder = game.ReplicatedStorage:WaitForChild("Tools")
local frame = script.Parent:WaitForChild("Frame")
local template = frame:WaitForChild("Template")
for _, tool in pairs(folder:GetChildren()) do
local newTemplate = template:Clone()
newTemplate.Name = tool.Name
newTemplate.ObjectName.Text = tool.Name
newTemplate.Visible = true
newTemplate.Parent = frame
--Tool in the VPF
--Event for when you click it
newTemplate.MouseButton1Click:Connect (function()
local result = game.ReplicatedStorage.BuyItem:InvokeServer(tool.Name)
if result == true then
-- We know it was a success
else
-- We know it went wrong
end
end)
end

3 comments
Where's line 41? That's where the error's occuring
im not sure, i dont have any scripts that are all the way down at line 41
I dont think that error had anything to do with the script I put. It was just from some random part from a model I had.