Its probably a stupid mistake I have made like usual or I just did it wrong. Its a LocalScript if that helps Someone please look at it and try to help
local frame = script.Parent.Parent local blur = game.Lighting:WaitForChild("Blur") local player = game.Players.LocalPlayer local output = script.Parent.Parent.Output while true do script.Parent.MouseButton1Click:Connect(function() frame:TweenPosition(UDim2.new(-1,0,-0.052,0), "In", "Sine", 1.5) wait(0.3) repeat blur.Size = blur.Size - 0.1 wait(0.01) until blur.Size == 0 blur.Enabled = false player.Character:MoveTo(Vector3.new(-202, 6.1, 44)) if blur.Size >= 0 then blur.Size = 0 ---------------------Class Module By Ki_ngPhantom--------------------- local lighting = game:GetService("Lighting") local guns = lighting.Guns local pack = player.Backpack if output.Text == "Class: Assault" then local AKM = guns.Assault.AKM:Clone() AKM.Parent = pack local M9 = guns.Assault.M1911 M9.Parent = pack end end end) end
I don't believe this has anything to do with FilteringEnabled; the problem is that you have a while true do
starting on line 5, and all it does is continually make connections to the same anonymous function forever. (Remember that the wait
commands inside the anonymous function won't execute until MouseButton1Click occurs, which can't happen if your game is frozen. Further, as SimpleFrame suggests, you don't need to connect the event more than once.) Remove the while loop and your game should stop freezing.