#Help to make a leadership barrier

9 messages · Page 1 of 1 (latest)

orchid mortar
#

I want when the leaderboard has a certain value, then the invisible wall disappears

#
local playerld = game.Players.LocalPlayer
local leaderstats = playerld:WaitForChild("leaderstats")
local Sheets = leaderstats:WaitForChild("Sheets")
---
local fldBAR = game.Workspace.lvl_BARRIER
---
local TextChatService = game:GetService("TextChatService") 
local TextChannels = TextChatService:WaitForChild("TextChannels")
local target = TextChannels:WaitForChild("RBXSystem")
---

if Sheets == 5 then
    game.StarterGui:SetCore("ChatMakeSystemMessage",{ -- НЕ ПРОВЕРЕНО

        Text = "Пора идти дальше.";
        Font = Enum.Font.Cartoon;
        Color = Color3.new(0.756863, 0.756863, 0.756863);
        FontSize = Enum.FontSize.Size36; 

    })
    fldBAR["lv.1 - road start"]:Destroy()
end

#

it's in serverscriptservice

#
---

local TextChatService = game:GetService("TextChatService") 
local TextChannels = TextChatService:WaitForChild("TextChannels")
local target = TextChannels:WaitForChild("RBXSystem")

---
local parentPart = script.Parent

local recentlyDamagedCharacters = {}
---

local function onTouch(otherPart)

    local character = otherPart.Parent
    local humanoid = character:FindFirstChildWhichIsA("Humanoid")
    local player = game:GetService("Players"):GetPlayerFromCharacter(character)

    if player and humanoid and not recentlyDamagedCharacters[character] then
        target:SendAsync("It seems I haven't looked everywhere to go this far.")
        recentlyDamagedCharacters[character] = true
        wait(15)
        recentlyDamagedCharacters[character] = nil
    end
end

parentPart.Touched:Connect(onTouch)
#

local script

#

is it possible that I have spaces in the names, which is why it doesn't work?

elfin nebula