So I have been trying to make a class fighting game kinda like Critical Strike but I have run in to some issues with the gun
local bulletbrick = script.Parent.bullet script.Parent.Activated:Connect(function() print("Its workng") local bullet = bulletbrick:Clone() bullet.Parent = script.Parent bullet.Anchored = true bullet.Weld:Remove() bullet.damage.Disabled = false bullet.CFrame = bullet.CFrame + bullet.CFrame.lookVector * 1 for x = 1, 10 do wait((.01)) bullet.CFrame = bullet.CFrame + bullet.CFrame.lookVector * 1 end bullet:remove() end) --and here is the script that is inside of the bullet script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") and hit.parent.Name ~= script.Parent.Parent.Parent.Name then hit.parent.Humanoid.Health = hit.parent.Humanoid.Health -5 script.Parent:remove() elseif hit.parent.Name ~= script.Parent.Parent.Parent.Name then script.Parent:remove() end end)
however its laggy and weird here is a video [https://streamable.com/3qu2h0] So does anyone know how to fix this?