Hey everyone! Title says it all. No errors in output…
Both LocalScript and BoolValue are in StarterPlayerScriptts
Info.Running.Changed:Connect(function()
if Info.Running.Value == true and Info.Running.Enabled.Value == true and Info.Moving.Value == true and Info.Crouching.Value == false then
print("working?")
elseif Info.Running.Value == false then
print("nope")
end
end)
EDIT: I guess it is the way that I wrote the conditions maybe… EDIT²: Yes, I checked all conditions and they all met.
Is Running the BoolValue? If so, you should not use .Value on that data type. .Value is mostly just used in IntValues. You can try this for better clarity;
local function runningChanged()
if Info.Running and Info.Running.Enabled and Info.Moving and not Info.Crouching then
print("Check1; passed")
elseif not Info.Running then
print("Check2; not passed")
else
warn("Check3; conditions are incorrect.")
end
end
Info.Running.Changed:Connect(runningChanged)
task.wait(3)
Info.Running = not Info.Running
When working on LocalScripts it’s always best practice to use :WaitForChild as instances can take time to load.
local Info=script.Parent:WaitForChild("Info") -- Change these paths to match your actual paths
local Running=Info:WaitForChild("Running")
local Enabled=Running:WaitForChild("Enabled")
local Moving=Info:WaitForChild("Moving")
local Crouching=Info:WaitForChild("Crouching")
Running.Changed:Connect(function()
if Running.Value == true and Enabled.Value == true and Moving.Value == true and Crouching.Value == false then
print("working?")
elseif Running.Value == false then
print("nope")
end
end)