How to make a Hide Player Script in Roblox studio!

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • local Players = game:GetService("Players")
    local car = script.Parent
    function Invisible(character, transparency)
    for _, part in pairs(character:GetDescendants()) do
    if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" or part:IsA("Decal") then
    part.Transparency = transparency
    end
    end
    end
    local function handleSeat(seat)
    local currentplayer = nil
    seat:GetPropertyChangedSignal("Occupant"):Connect(function()
    local humanoid = seat.Occupant
    if humanoid then
    local character = humanoid.Parent
    local player = Players:GetPlayerFromCharacter(character)
    if player then
    currentplayer = player
    Invisible(character, 1)
    end
    else
    if currentplayer then
    local character = currentplayer.Character
    if character then
    Invisible(character, 0)
    end
    currentplayer = nil
    end
    end
    end)
    end
    for _, seat in pairs(car:GetDescendants()) do
    if seat:IsA("Seat") or seat:IsA("VehicleSeat") then
    handleSeat(seat)
    end
    end
    Game link www.roblox.com....
    My discord server discord.gg/saAxAyRhTT
    Roblox profile www.roblox.com....
    Roblox group www.roblox.com....
    My merch links are provided in this document docs.google.co....
    (tags) #car #recommended #roblox #automobile #gfx #tutorial

КОМЕНТАРІ • 1

  • @Glitchyy_23
    @Glitchyy_23  29 днів тому +2

    If yall want more roblox studio tutorials lmk!!! I love doing these videos.
    Feel free to ask me questions or if you want to leave a review ect, Please do I answer almost every comment!