game.Players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
local args = msg:split(" ")
local plrb = args[2]
local duty = args[3]
local user = game.Players:FindFirstChild(plrb)
local user2 = game.Players:FindFirstChild(plrb)
local Time = script.Parent.Variables.Duty.DutyTime.Value
if args[1] == "-duty" then
if duty and user then
if Time then
while true do
Time = Time - 1
user.Character.Head.Rank.Frame.Name1.Text = "("..Time.."m) - "..duty.." - " ..duty.Name
wait(60)
if Time == "0" then
user.Character.Head.Rank.Frame.Name1.Text = duty.Name
end
end
end
end
end
end)
end)
At this part
user.Character.Head.Rank.Frame.Name1.Text = "("..Time.."m) - "..duty.." - " ..duty.Name
Either Time or duty is nil. Make sure they have a string value before you combine them with strings
What do you mean? Do you mind explaining.
The values are nil, you are combining them with a string but they have no value so you cant combine them
What you mean by values are nil? the dutytime is set.