i made a script so that if you join a clan for example heroes, you get a certain GUI shop only available for the people that clicked on the text button Heroes. but if you joined the clan for example Enemies, you get access to the shop that is only available to enemies. i made 2 shops for each of them. called the hero one Hero Shop and enemies one Enemyshop. Also help me on line 4...
--I AM A NOOB AT SCRIPTING
function onclicked()
Intro.Frame.Uzumaki --- Actually Heroes so Intro.Frame.Heroes
if = clicked(function) ---- Please explain why this is wrong or has a red line beneath it
Uzumakishop.visible = true
or if clicked.Uchiha ---Actually Enemies so if clicked.Enemies
Uzumakishop.visible = false
end
end
end
function onclicked()
Intro.Frame.Uchiha
if = clicked(function) ---- Why Doesnt This Have a Line Benteath it?
Uchihashop.visible = true
or if clicked.Uchiha
Uzumakishop.visible = false
end
end
end
-- did this all by myself with all the knowledge i got on Lua, I even Checked the wiki on this and it didnt help me :(
but i improved my script!
function onclicked()
if onclicked() then Intro.Frame.Uzumaki --- Actually Heroes so Intro.Frame.Heroes
=button.MouseButton1Down:connect(onclicked)
Uzumakishop.Visible = true
if clicked.Uchiha ---Actually Enemies so if clicked.Enemies
then Uzumakishop.Visible = false
end
end
end
function onclicked()
if onclicked() then Intro.Frame.Uchiha
=button.MouseButton1Down:connect(onclicked)
Uchihashop.Visible = true
if clicked.Uchiha
then Uzumakishop.Visible = false
end
end
end

5 comments
why should i use if statements
What?
you said i could use if statments, but i dont get if statements also i dont understand button.MouseButton1Down:connect(function() as i told you in the script... i am a noob at scripting
You'd pretty much have to re-create everything and I don't really want to make everything for you but if you don't understand that stuff then you won't be able to make it at your current level of understanding
well you helped a lot