#what part of this do i need to change

1 messages · Page 1 of 1 (latest)

austere cipher
#

I want the rare announcer trying to check if an "OreGradient" exists, if so use the gradient color, but if it doesn't exist, then use the color3value.

#

local function DisplayAnnouncement(Message,Time,MessageColor,MessageStrokeColor,SoundId)
    spawn(function()
        Time = Time or 3
        local Announcement = script.Parent.Announcement:Clone()        
        
        Announcement.TextTransparency = 1
        Announcement.TextStrokeTransparency = 1
        Announcement.Text = Message
        Announcement.TextColor3 = MessageColor or Color3.new(1,1,1)
        Announcement.TextStrokeColor3 = MessageStrokeColor or Color3.new(0,0,0)
        Announcement.Parent = script.Parent.Announcements
        
        
        
        
        local xSize = (math.ceil(Announcement.TextBounds.X / 2) * 2) + 10
        Announcement.Size = UDim2.new(0,xSize,0,30)
        
        Announcement.Visible = true
        local Sound
        
        if SoundId then
            Sound = Instance.new("Sound")
            Sound.Name = "AnnouncementSound"
            Sound.Volume = 1
            Sound.SoundId = "rbxassetid://"..SoundId
            Sound.Parent = script.Parent
            Sound:Play()
        end
        
        Announcement.BackgroundTransparency = 1
        local Properties = {"TextTransparency","TextStrokeTransparency"}
        local Goal = {0,0}
        if (game.LocalizationService.RobloxLocaleId == "en-us") then
            table.insert(Properties,"BackgroundTransparency")
            table.insert(Goal,0.5)
        end        
        
        tween(Announcement,Properties,Goal,0.5)
        wait(Time + 0.5)
        tween(Announcement,Properties,1,0.5)
        wait(0.5)
        
        if Sound then
            Sound:Destroy()
        end
        Announcement:Destroy()
    end)
end

#

here is the code

turbid yoke
#

im confused what you mean @austere cipher

#

what is ore gradient

toxic pecanBOT
#

studio** You are now Level 25! **studio

austere cipher
austere cipher
#

im still kinda new to scripting tho so im lost