I have a problem that this script does still run even tho the bool value is false the script still runs.
It doesn’t show any errors.
runService.RenderStepped:Connect(function()
local plr = game.Players.LocalPlayer
local character = plr.Character or plr.CharacterAdded:Wait()
ServerEvent:FireServer()
local Hum = character:FindFirstChildOfClass("Humanoid")
if Hum.MoveDirection.Magnitude > 0 and Hum.WalkSpeed > 0 then
-- it breaks here
if script.Parent:FindFirstChild("Status").BoolValue.Value ~= false then
print("Moved")
game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true)
end
end
end)
Does it error at all? Why use ~= false when you could just do == true? You might even just be able to do .Value, not sure if that would only check if it exists or not.
There are a couple of other bits:
Firing a remote every frame is going to cause memory issues.
Why are you setting a core GUI enabled every frame?
If you’re trying to detect if the character is moving or not, you can utilise the StateChanged event.
Not moving or not, nothing at all. No errors. I tried the other way to check if the value is false or true, nothing worked. It still refreshes the backpack even if the value is false.
in the post it checked BoolValue Value
and in the video the name is CanRunAntiCamp
maybe this is the issue? if script.Parent:FindFirstChild("Status").CanRunAntiCamp.Value == true then
and let me know if it is registers the change. If not, I don’t know what might be making it not work. You could try using a RemoteEvent on the server to tell the client to update it.
Also, where is this script located? Is it a Script or a LocalScript?