This module controls a lot of functions related to a round system, and I’m looking to make a function that sets a random players’ string value to something and I only know how to select a random intvalue. Any help is appreciated.
local module = {}
local Players = game:GetService("Players")
function module.TeleportPlayer(PlayerName, TeleportLocation)
local Player = Players:FindFirstChild(PlayerName)
if Player then
local Character = Player.Character or Player.CharacterAdded:Wait()
Character:FindFirstChild("HumanoidRootPart").CFrame = TeleportLocation.CFrame
end
end
function module.TeleportPlayers(TeleportLocation)
for Index, Player in ipairs(Players:GetChildren()) do
module.TeleportPlayer(Player.Name, TeleportLocation)
end
end
Players.PlayerAdded:Connect(function(Player)
local Status = Instance.new("StringValue")
Status.Parent = Player
Status.Name = Player.Name
end)
return module