#Script not working

3 messages · Page 1 of 1 (latest)

molten badge
#
local function Shoot(actionName, UserInputState)
    
    local IsShooting
    
    if actionName == b and UserInputState == Enum.UserInputState.Begin then

        IsShooting = true
        
    elseif UserInputState == Enum.UserInputState.End then
        
        IsShooting  = false
        
    end
    
    while IsShooting == true and Bullets.Value > 0 do
        
        local mousepos = mouse.Hit.Position
        
        ShootEvent:FireServer(mousepos)
        task.wait(ShotSpeed.Value)
    end
    
end

the while loop is not working with no errors at all

topaz bay
#

Usually if there is no errors in the output , your conditional is not met

#

Try printing before and after each conditional