it skips the if statement in the while loop and i dont know why
check = true > script.Parent.MouseButton1Click:connect(function() --if game.Players.LocalPlayer.Backpack:findFirstChild("Fishing Rod") then print("hmm") > while check do wait() print("We've entered the loop >:)") > if game.Players.LocalPlayer.Backpack:findFirstChild("Fishing rod") then print("were in!") game.Players.LocalPlayer.Backpack:findFirstChild("Fishing rod"):remove() else check = false end end print("Done, movin on") --end end)
It's simple. Make it at a LocalScript and put it at the SarterGui or at the StarterPack.
nvm i got it all it took was
script.Parent.MouseButton1Click:connect(function() game.Players.LocalPlayer.PlayerGui.buyfx:Play() if script.Parent.Parent.description.Text == "Gold fish" and game.Players.LocalPlayer.Backpack:findFirstChild("Gold fish") then repeat game.Players.LocalPlayer.Backpack:findFirstChild("Gold fish"):remove() game.Players.LocalPlayer.gamestats.m.Value=game.Players.LocalPlayer.gamestats.m.Value+10 until game.Players.LocalPlayer.Backpack:findFirstChild("Gold fish") == nil
easy..