How to Make a Random Killer Selector (Inspired by Dead by Daylight) in Roblox!

Опубликовано: 12 Август 2026
на канале: Sharky Dev
5,130
164

LocalScrpt = local ReplicatedStorage = game:GetService("ReplicatedStorage")
local roleEvent = ReplicatedStorage:WaitForChild("AnnounceRole")

local label = script.Parent:WaitForChild("RoleLabel")

-- center + style
label.AnchorPoint = Vector2.new(0.5, 0.5)
label.Position = UDim2.new(0.5, 0, 0.5, 0) -- center of screen
label.TextScaled = true
label.Visible = false

-- fade in/out when role is picked
roleEvent.OnClientEvent:Connect(function(role)
label.Text = "You are the " .. role .. "!"
if role == "Killer" then
label.TextColor3 = Color3.new(1, 0, 0) -- Red
else
label.TextColor3 = Color3.new(0, 1, 0) -- Green
end

label.Visible = true
label.TextTransparency = 1

-- fade in
for i = 1, 0, -0.1 do
label.TextTransparency = i
wait(0.05)
end

wait(2) -- keep it on screen

-- fade out
for i = 0, 1, 0.1 do
label.TextTransparency = i
wait(0.05)
end

label.Visible = false
end)

Script = Will be Commented!