alright so im making a fps game and there is a button that allows u to change the loadout. and there are 2 buttons, the first one is for a P90 and the second one is for a AK-47. and if i click the P90 button, the ak-47 button becomes invisible. but if i click the ak-47 button. the P90 button becomes invisible. but after clicking the change loadout button a few times. the scripts stop to work. why???
4 Likes
To help you figure out the bug we’d need to see your code.
1 Like
alright. heres the code for the P90 button.
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent["Ak-47 {main}"].Visible = false
end)
and heres the ak-47
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent["P90 "].Visible = false
end)
1 Like
That can’t be the full script, unless something is erroring somewhere.
1 Like
i actually dont get any errors. i can record a video and send it here so u can see.
2 Likes
it will be pretty laggy because i use F12 to record, im too lazy to download obs.
2 Likes
wait i gotta convert it into mp4
after i open the change loadout gui twice the scripts inside the buttons dont work anymore. the player can just choose both guns.
What I advice you to do, you could do it so the GUI closes after Change Loadout got pressed twice, this might be preventing from double selection.
1 Like