local MyMouse = game.Players.LocalPlayer:GetMouse()
MyMouse.KeyDown:connect(function(key)
if string.lower(key) == "g" and if game.Players.LocalPlayer.PlayerGui.Value==3 then
script.Parent.Chest.Ball1.Transparency=0
script.Parent.Chest.Ball2.Transparency=0
script.Parent.Chest.Ball3.Transparency=0
script.Parent.Chest.Ball4.Transparency=0
script.Parent.Chest.Ball5.Transparency=0
script.Parent.Chest.Ball6.Transparency=0
script.Parent.Chest.Ball7.Transparency=0
script.Parent.Chest.Ball8.Transparency=0
script.Parent.Chest.Ball9.Transparency=0
script.Parent.Chest.Ball10.Transparency=0
script.Parent.Chest.Ball11.Transparency=0
script.Parent.Chest.Ball12.Transparency=0
script.Parent.Chest.Ball13.Transparency=0
script.Parent.Chest.Ball14.Transparency=0
script.Parent.Chest.Ball15.Transparency=0
script.Parent.Chest.Ball16.Transparency=0
script.Parent.Chest.Ball17.Transparency=0
script.Parent.Chest.Ball18.Transparency=0
script.Parent.Chest.Ball19.Transparency=0
script.Parent.Chest.Ball20.Transparency=0
script.Parent.Chest.Ball21.Transparency=0
script.Parent.Chest.Ball22.Transparency=0
while string.lower(key) == "g" do
wait(1)
end
end
end)
COMMUNITY QUESTION
A keydown script not working?
2 answers
"if string.lower(key) == "g" and if" .. really? the "and" implies you are going to add to the if statement, delete it and see if your script works.
Delete the second if that follows and
This discussion is preserved as it was. New answers, comments, and votes are closed.
