I have that two scripts: And ,if its possible, i want to "pause" the second one when the first one detects both values ==1
First one
while true do
if script.Parent.V.Value == 1 and Light.Value == 1 then
script.Parent.Base.PointLight2.Range = 18
script.Parent.Humanoid.WalkSpeed = 30
end
Second one
while true do
wait(1)
script.Parent.HumanoidRootPart.Steps:Stop()
script.Parent.Base.PointLight.Range = 0
script.Parent.Base.PointLight2.Range = 0
script.Parent.Humanoid.WalkSpeed = 6
script.Parent.V.Value = 1
local Player = game:GetService("Players").LocalPlayer
local stats = Player:WaitForChild("leaderstats")
local Light = Player.leaderstats.Light
if script.Parent.V.Value == 1 and Light.Value == 1 then
script.Parent.Base.PointLight2.Range = 18
script.Parent.Humanoid.WalkSpeed = 30
else
end
wait(math.random(7 ,10))
script.Parent.V.Value = 0
script.Parent.Base.PointLight.Range = 18
script.Parent.Humanoid.WalkSpeed = 25
wait (1)
if Light.Value == 1 then
script.Parent.Humanoid.WalkSpeed = 6
script.Parent.HumanoidRootPart.Anchored = true
script.Parent.HumanoidRootPart.Scream:Play()
script.Parent.HumanoidRootPart.Steps:Stop()
wait (2)
script.Parent.HumanoidRootPart.Steps:Stop()
script.Parent.HumanoidRootPart.Scream:Stop()
script.Parent.Base.PointLight.Range = 0
script.Parent.Base.PointLight2.Range = 0
wait (3)
script.Parent.HumanoidRootPart.Anchored = false
script.Parent.Humanoid.WalkSpeed = 6
script.Parent.V.Value = 1
wait (3)
end
end

4 comments
i like this.
You can also make the while loop
while not pause doinstead of having constant return statements?I tested that out, and when I changed the value and put it back, it didn't loop anymore.
Your loop resumes despite using a return statement?