How to run a function multiples times

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to achieve is that everytime my model needs to go to n.CFrame, I want call my function.

  2. What is the issue? Include screenshots / videos if possible!
    The issue is that my variable never changes

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tried debounce. I have looked for solutions on the Developer Hub

local ss = game:GetService("ServerStorage")
local mf = ss:WaitForChild("Markers"):GetChildren()
local sp = workspace:FindFirstChild("MarkerSpawns")
local asp = sp:GetChildren()
local n = math.random(#asp)

local tmf = {
	mf[1]:Clone(),
	mf[2]:Clone(),
	mf[3]:Clone(),
	mf[4]:Clone(),	
	mf[5]:Clone(),
	mf[6]:Clone(),
	mf[7]:Clone()
}
local u = {}

local function random()
	repeat
	n = math.random(#asp)
	until (not u[n])
	u[n] = true
	return n
end

random()
for _,v in pairs(tmf) do
	wait(1)
	v.Parent = workspace
	wait(1)
	if u[n] == true then
		random()
		v:PivotTo(CFrame.new(n,2,0) + Vector3.new(0,2,0))
	end
end	
spawn(random())

Maybe that are you asking?

Not to sure what you mean. Can’t you just do something like this?

if condition then
function()
end

If you’re trying to run multiple functions at once, look below at @DryOfficial’s response.

I’m trying to get another value everytime I call random. When I do that. I don’t get another value

Could you perhaps add a few print statements and then show me the output?

Try to use a variable like current variable given,
For example, running a function, so function check the variable when random variable is same to current variable, run the function again until it makes different variables. when it makes different variable, the current variable now changed to new variable.

printintpit
This printing both n and u.

But my variable never changes.

math.randomseed(os.time())
return math.random(10, 20)