# kts.RandomChance

## Name

kts.RandomChance – generate a random boolean value

## Synopsis

`result = kts.RandomChance(probability)`

## Description

The `probability`

should be a number between 0 and 1. This function will return `true`

with the given probability, or `false`

otherwise.

## Return Value

Returns a boolean as described above.

## Errors

An error is raised if the input is not a number.

(If the input is a number outside the range 0 to 1, then this does not cause an error, instead the number is adjusted into the correct range and then the function continues normally.)

## See Also

kts.GetRandomPos

kts.RandomRange