NikkoStudios
  • Welcome
  • Notification System
    • Introduction
    • Installation
    • Usage
  • Overhead UI
    • Introduction
    • Usage
Powered by GitBook
On this page
  • :Init()
  • :GiveOverhead(args)
  • :GiveBadge(plr, badgeName, badgeId)
  • :RemoveBadge(plr, badgeName)
  • :SetName(plr, name, nameColor)
  • :SetRank(plr, rank, rankColor)
  • :SetSpecialRank(plr, rank, rankColor)
  1. Overhead UI

Usage

Note: Everything must be done from the Server, through ServerScriptService

:Init()

Server Script
local Overhead = require(game.ReplicatedStorage:WaitForChild("NSOverhead"))
Overhead:Init()

This is required in order to initialize the Overhead UI Module.

:GiveOverhead(args)

Server Script
local Overhead = require(game.ReplicatedStorage:WaitForChild("NSOverhead"))
Overhead:Init()

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function()
        local args = {}
        args.Plr = plr
        args.PlrColor = Color3.fromRGB(255, 255, 255)
        args.Rank = " My Rank"
        args.RankColor = Color3.fromRGB(165, 58, 58)
        args.SpecialRankEnabled = true
        args.SpecialRank = "My Special Tag"
        args.SpecialRankColor = Color3.fromRGB(194, 33, 116)
        args.BadgesEnabled = true
        Overhead:GiveOverhead(args)
    end)
end)

This creates the base of the Overhead UI. This will give the player the UI whenever their character spawns in.

:GiveBadge(plr, badgeName, badgeId)

Server Script
local Overhead = require(game.ReplicatedStorage:WaitForChild("NSOverhead"))
Overhead:Init()

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function()
        local args = {}
        args.Plr = plr
        args.PlrColor = Color3.fromRGB(255, 255, 255)
        args.Rank = " My Rank"
        args.RankColor = Color3.fromRGB(165, 58, 58)
        args.SpecialRankEnabled = true
        args.SpecialRank = "My Special Tag"
        args.SpecialRankColor = Color3.fromRGB(194, 33, 116)
        args.BadgesEnabled = true
        Overhead:GiveOverhead(args)
        Overhead:GiveBadge(plr, "Developer", "http://www.roblox.com/asset/?id=6034275725")
    end)
end)

This will give the player a "badge" or an overhead icon.

Plr is the player instance.

badgeName is the name the badge will be given.

badgeId is the image id of the badge.

:RemoveBadge(plr, badgeName)

Server Script
local Overhead = require(game.ReplicatedStorage:WaitForChild("NSOverhead"))
Overhead:RemoveBadge(plr, "Developer")
-- plr is the Player Instance and "Developer" is the badge name that was assigned.

:SetName(plr, name, nameColor)

Server Script
local Overhead = require(game.ReplicatedStorage:WaitForChild("NSOverhead"))
Overhead:SetName(plr, "Some Name", Color3.fromRGB(255,255,255))

:SetRank(plr, rank, rankColor)

Server Script
local Overhead = require(game.ReplicatedStorage:WaitForChild("NSOverhead"))
Overhead:SetRank(plr, "Some Rank", Color3.fromRGB(255,255,255))

:SetSpecialRank(plr, rank, rankColor)

Server Script
local Overhead = require(game.ReplicatedStorage:WaitForChild("NSOverhead"))
Overhead:SetSpecialRank(plr, "Some Special Rank", Color3.fromRGB(255,255,255))

The :Set will only work if they player already has an OverheadUI, if not it will not work.

PreviousIntroduction

Last updated 3 years ago

Page cover image