Ok so, in a tool I have a bunch of local scripts, I have 2 scripts one of the Local scripts and inside of it a global script, inside the local script there is a bool value called "Busy" the local script do the fire server thingy on a remote event inside of the global script, the remote event fires only when I say something specific let's say for this case "Aqua eructo" so when I do say that, the local script will fire the remote event fire server and it will set the BoolValue of the local script to false and will set the busy value of all of the other local scripts in the tool to true and then the global script will run it's content but only when I click (I used Activated:wait()) right after that it supposed to check if Bool is true and if it is, it supposed to return end. now the problem is that when I click play on the studio I basically test on the client and when busy is set to true the global script won't run as expected, but in a local server that I have opened when the Boolvalue is true the global script will still run and perform it's contect those are the scripts:
Local script:
local wand = script.Parent
local inc = script.Name
local owner, connect
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Mousehit = Mouse.Hit.p
function Setup()
for i,p in pairs(game.Players:children()) do
if (p.Character == wand.Parent) then
print("Ok123")
if (connect ~= nil) then connect:disconnect() end
connect = p.Chatted:connect(PlayerTalked)
owner = p
end
end
end
function PlayerTalked(words)
print("Someone talked!")
if (string.find(words:lower(), inc:lower()) ~= nil) and (wand.Parent == owner.Character) then
print("Casting...''" ..inc.. "''")
script.Busy.Value = false
script["Aqua eructo"].Disabled = false
script.Done.Value = false
wait()
for i,v in pairs(script.Parent:GetChildren()) do
if v:IsA('LocalScript') then
print("it's a local")
local s = v:WaitForChild("Busy")
if s.ClassName == "BoolValue" and s.Name == "Busy" and s.Parent ~= script then
print("Horray")
local Busy = s
Busy.Value = true
end
end
end
if owner.Character.Torso:FindFirstChild("Torso") then return end
if owner.Character.Humanoid.JumpPower == 0 then return end
print("Really?")
script["Aqua eructo"].RemoteEvent:FireServer(Mousehit)
end
end
script:WaitForChild("Aqua eructo"):WaitForChild("RemoteFunction").OnClientInvoke = function()
return owner.Character.Humanoid.TargetPoint
end
wand.Equipped:connect(Setup)
Global script:
script.RemoteEvent.OnServerEvent:connect(function(Player,Mousehit)
Busy = script.Parent:WaitForChild("Busy")
Done = script.Parent:WaitForChild("Done")
if Busy.Value == true then return end
local wand = script.Parent.Parent
local owner, connect
wand.Activated:wait()
if script.Parent.Busy.Value == true then return end
--do stuff--
--all of the "ends" are here--

20 comments
connect() is deprecated and so is disconnect(), that might be your problem
Then what do I do?
capitalize the two methods
it's that simple :P
Oh alright, let me try this.
The global script still runs when the busy value is true on the server.
"if Busy.Value == true then break"?
or put "return end"/"break" in the code block following the if statement
"if script.Parent.Busy.Value == true then return end" I already did that?
Break works only in loops I think.
Another script that checks if the bool value is true, and accordingly disables the script?
I will try that a second.
Tried it and it didn't work.
Doesn't* it works on the client play option in studio though.
You set the value on a localscript; which is local, which means nothing to the server and the server can’t see it. Try using the localscript itself to check for it before firing to the server.
What do I need to change on the local script? I am confused, Idk where to put the if statement in the local script to check on the Boolvalue can you help me with that?
hold up lemme post the answer
Wait I understand what you meant, it is not about the if statment it is about the setting of the other busy values to true and the setting of the boolvalue of the local script to false in the local script itself I need to find a way to do the changes on the server
I would like you to do it, thank you.
Are you going to upload an answer?