It makes that when a player touches in your parent it gives a victory to the global leboard.
I want to tweak the script so the player gets a win if my boolValue is = true. And not by touching in this part. I puted the script in severScriptService and make a boolValue in replicated storage but With my method of using if boolValue.Value == true them …
Didn’t worked then you can help? Thank you
Sorry I can’t put scripts in here beacause I’m making a post on my cell phone.
Look The script makes that if you touches in parent of the script the player get a win I want to make the same thing happens but if the Value == true and not by touching in script. parent
local datastore = game:GetService("DataStoreService"):GetOrderedDataStore("Wins")
game.ReplicatedStorage.WinValue.Changed:Connect(function()
if game.ReplicatedStorage.WinValue.Value == true then
for i,plr in ipairs(game.Players:GetChildren()) do
datastore:IncrementAsync(plr.UserId,1)
end
end
end)