Here is my code for the part:
local orgPos = script.Parent.CFrame
local InRound = game.ReplicatedStorage.InRound
local BlueTake = game.ReplicatedStorage.Bluetake --Here is the bool value I'm trying to change
local debounce = false
function onTouch(hit)
if not debounce then
debounce = true
print(hit.Parent)
local plr = game.Players:FindFirstChild(hit.Parent.Name)
local blue = game:GetService("Teams")["Bloo"]
if plr and plr.Team == blue then
script.Parent.CFrame = game.Workspace.Dump.CFrame
plr:FindFirstChild("leaderstats")
wait(1)
plr.leaderstats.Flags.Value += 1
print("true")
end
if InRound.Value then
print("checked")
BlueTake.Value = true --Here's what I did
end
debounce = false
end
end
script.Parent.Touched:Connect(onTouch)
InRound.Changed:Connect(function()
if not InRound.Value then
script.Parent.CFrame = orgPos
end
end)
Edit: Sorry if I wasn't clear, I'm posting this question because the script didn't change the value and I don't know why.

11 comments
But it didn't work, it didn't adjust anything.
It is supposed to. you messed up something. show me the whole script
That is the whole script, there's a boolvalue named Bluetake in Replicatedstorage and I'm trying to get the script to change that value to true if someone touches the part and the round isn't over.
I can make you a script to change the boolean but you have to make the round thing ok?
Thanks, and yes the round thing has already been made and it is working fine, but the boolean isn't changing.
Let me write a script.
You also should manage the round with a boolean either. if the round ends the boolean change to false or true idk and all the scripts can see if it ended. it would be easier to do so.
Yes that's how I manage the round, with the InRound boolean
then add a line: if InRound.Value == false then and add an end before the end) at the end. i hate you so much english.
wow, WOW, it worked, why did I not think of this before. Thank you so much.
You're welcome.