I want to make a script that gives a StringValue your name unless someone elses name (on the server) already is the value.
I'm guessing you want a random player for the server, and unless someones else's name is already on the server it will automatically choose one.
local StringValue = Instance.new('StringValue') StringValue.Parent = game:GetService('Workspace') --//You Can Change this Destination\\-- local randomPlayer = game.Players:GetPlayers()[math.random(1,#game.Players:GetPlayers())] local plrname = randomPlayer.Name if StringValue.Value == nil then StringValue.Value = plrname end
Nevermind I was just stupid you just say "if StringValue == nil then"