You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve?
I’m currently trying to figure out how to make this script work onto every player in the game. -
What is the issue?
The gui and script will only work on players that joined before the player that joined unless that player resets. -
What solutions have you tried so far?
While wait() do
wait true do
wait()
game:GetService("RunService").RenderStepped:Connect(function()
for i ,v in pairs(game.Players:GetPlayers()) do
if v.Name ~= LocalPlayer.Name then
if v.Character and v.Character.HumanoidRootPart then
if (LocalPlayer.Character.HumanoidRootPart.Position - v.Character.HumanoidRootPart.Position).Magnitude <= 6 then
local NearestPlayer = v.Name
script.Parent.NearestPlayer.Value = NearestPlayer
clone.Adornee = v.Character.Torso
clone.Enabled = true
if v.Character.Humanoid.Sit == true then
cg = false
grb.Visible = false
clone.List.Key.TextLabel.Text = "Eject - "
clone.List.Key.ImageLabel.TextLabel.Text = "X"
cc = nil
rv = true
else
if Cuffed == true then
grb.Visible = true
cg = true
end
clone.List.Key.ImageLabel.TextLabel.Text = "C"
cc = false
rv = false
if Cuffed == true then
clone.List.Key.TextLabel.Text = "Relase - "
else
clone.List.Key.TextLabel.Text = "Handcuff - "
end
end
if show == true then
cf.Visible = true
else
cf.Visible = false
end
end
end