Tipis tower 2
4.8k Views
371 Executions

Music Gui

Tipis tower 2
OnlyThePower
OnlyThePowerPublished 10
1 year ago
Please login to perform these actions:

Music Gui is a Tipis tower 2 script for Roblox, uploaded to ScriptBlox on Aug 30, 2025.

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Music gui

Updates

  1. Script edited: Update script

View Raw
local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SoundService = game:GetService("SoundService")
local player = Players.LocalPlayer

-- Buat RemoteEvent kalau belum ada
local remote = ReplicatedStorage:FindFirstChild("GunPlaySound")
if not remote then
    remote = Instance.new("RemoteEvent")
    remote.Name = "GunPlaySound"
    remote.Parent = ReplicatedStorage
end

local currentSound -- variabel global untuk menyimpan sound yang sedang dimainkan

-- Fungsi mainkan musik
local function playSound(assetId)
    -- Hentikan dulu musik lama kalau ada
    if currentSound then
        currentSound:Stop()
        currentSound:Destroy()
    end

    local sound = Instance.new("Sound")
    sound.SoundId = "rbxassetid://"..assetId
    sound.Volume = 1
    sound.Parent = SoundService
    sound:Play()
    currentSound = sound

    sound.Ended:Connect(function()
        sound:Destroy()
        currentSound = nil
    end)
    
    print("🎵 Music started! Asset ID:", assetId) -- console developer
end



Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More Tipis tower 2 scripts

See all