When Value is true, it doesn’t see it. Value becomes true after clicking Textbutton.
local function demolation(plr)
local char = plr.Character
local plrgui = plr.PlayerGui.ScreenGui
local maps = replicatedstorage:WaitForChild("Maps")
local demolation = maps:WaitForChild("Demolation")
local boolvalue = Instance.new("BoolValue")
boolvalue.Name = "accept"
boolvalue.Parent = plrgui
plrgui.Frame.Timer.Text = "10"
for i=1,10 do
wait(1)
plrgui.Frame.Timer.Text = i
end
plrgui.Frame.Visible = false
if boolvalue.Value == true then
local building = demolation.Building:Clone()
building.Parent = workspace.mapstorage
end
end
remotevents.Demolation.OnServerEvent:Connect(demolation)
Button Localscript
local scrngui = script.Parent.Parent.Parent
script.Parent.MouseButton1Click:Connect(function()
local value = scrngui:WaitForChild("accept")
value.Value = true
script.Parent.Parent.Decline.Visible = false
end)