So I have a script where if you press 4 buttons around the map then the floor becomes semi-transparent and uncancollide (normally it’s untransparent and cancollide) and the buttons go from being green colored to red color when pressed, I want to make it so that if the player does actually press all 4 buttons (which leads to the floor becoming semi-transparent and uncancollide), I want it to save, so that if the player leaves the server and joins any other server it will stay the same way the player left it (all buttons pressed and the floor is still semi-transparent and uncancollide) forever, so that any server they join in the future will still be that way for that player ONLY not all the players in the sever, how do I make such thing?
(I have no idea how to make it so please explain thoroughly.)
The local script is in StarterGUI:
local Part1 = game:GetService('Workspace'):WaitForChild("Part1")
local Part2 = game:GetService('Workspace'):WaitForChild("Part2")
local Part3 = game:GetService('Workspace'):WaitForChild("Part3")
local Part4 = game:GetService('Workspace'):WaitForChild("Part4") --== Change this to what you want, and to the parts name
--== Then add all the other parts
local HiddenBrick = game:GetService('Workspace'):WaitForChild('HiddenBrick') --== This is the part that will un-cancollide and becomes transparent, name is optional
local checks = 0 --== This will be counting how many have been pressed
local function checkCount() --== Function for checking the counts (this is optional, if you want something else let me know)
if checks == 4 then
HiddenBrick.Transparency = 0.5
HiddenBrick.CanCollide = false
end
end
Part1.ClickDetector.MouseClick:Connect(function() --== Add this for each button
Part1.ClickDetector:Destroy() --== So it can't be pressed again
Part1.Color = Color3.fromRGB(189, 0, 0)
checks += 1 --== Counts that the player pressed a button
checkCount() --== Run this after each button is pressed or run it in a loop
end)
Part2.ClickDetector.MouseClick:Connect(function() --== Add this for each button
Part2.ClickDetector:Destroy() --== So it can't be pressed again
Part2.Color = Color3.fromRGB(189, 0, 0)
checks += 1 --== Counts that the player pressed a button
checkCount() --== Run this after each button is pressed or run it in a loop
end)
Part3.ClickDetector.MouseClick:Connect(function() --== Add this for each button
Part3.ClickDetector:Destroy() --== So it can't be pressed again
Part3.Color = Color3.fromRGB(189, 0, 0)
checks += 1 --== Counts that the player pressed a button
checkCount() --== Run this after each button is pressed or run it in a loop
end)
Part4.ClickDetector.MouseClick:Connect(function() --== Add this for each button
Part4.ClickDetector:Destroy() --== So it can't be pressed again
Part4.Color = Color3.fromRGB(189, 0, 0)
checks += 1 --== Counts that the player pressed a button
checkCount() --== Run this after each button is pressed or run it in a loop
end)
*If it helps to know, the buttons are named (Part1, Part2, Part3, Part4) and the floor is named (HiddenBrick), also each Part/Button has a ClickDetector inside of them.