I have a script, I am about to clone it into all the other buttons.
But i have an idea, I want to put the script in the frame, and do the code for all of the buttons in one script.
while true do
wait()
script.Parent.EffectLabel.Text = script.Parent.Text
script.Parent.NameLabel.Text = script.Parent.nameValue.Value
script.Parent.NameLabel.EffectLabel.Text = script.Parent.nameValue.Value
script.Parent.CostLabel.Text = "["..script.Parent.costValue.Value.." points]"
if script.Parent.costValue.Value == 0 then
script.Parent.CostLabel.Text = "[free]"
end
script.Parent.CostLabel.EffectLabel.Text = script.Parent.CostLabel.Text
if game.Players.LocalPlayer.leaderstats.Points.Value >= script.Parent.costValue.Value then
script.Parent.CostLabel.TextColor3 = Color3.new(1,1,127/255) --has enough to purchase
else
script.Parent.CostLabel.TextColor3 = Color3.new(1,100/255,100/255) --does not have enough to purchase
end
end
Is there any way I can do this script, in all the buttons in the frame? In one script

2 comments
Thank you, it worked! Line 5 had an error, which I fiexed, not script.Parent , but v.Parent
I guess I missed that. Well, either way, glad to hear that it works.