|
|
You could do that or you could just loop through the table, example would be:
dead = {"One","Two","Three","Four","Five"}
for _,v in pairs(dead) do
print(v)
end |
|
|
|
while wait() do
if game.Players.NumPlayers >= 4 then
for k,p in pairs(game.Players:GetChildren()) do
p.PlayerGui.ChildAdded:connect(function(Child)
if Child.Name == "Announcements" then
p.Player.PlayerGui.Announcements.Waiting.Visible = true
end
end)
end
end
end |
|
|
Please explain to me the hierarchical order of the GUI's in StarterGui. |
|
|
It's limited to only the specific loop that it was started in. |
|
|
By "hierarchy", I'm basically referring to the order of the Parent's and Children, Include the names please. |
|
|
Chosen.Selected.Value = true |
|
|
Is "Waiting" the child of "Announcements"?. |
|
|
Hmm, well if "Waiting" is the "Child" of "Announcements" then this will be rather interesting. |
|
|
while wait() do
if game.Players.NumPlayers >= 4 then
for k,p in pairs(game.Players:GetChildren()) do
p.PlayerGui.ChildAdded:connect(function(Child)
if Child.Name == "Announcements" then
if Child:FindFirstChild("Waiting") then
--Code Here
else
print("Waiting Not Found!")
end
end
end)
end
end
end
|
|
|
|
MouseButton1Down is for things such as TextButtons, not Textbox's.
In a LocalScript, try something like.
Mouse = game.Players.LocalPlayer:GetMouse()
Mouse.KeyDown:connect(function(Key)
if TextBox.Text == "TextHere" and Key:byte() == "13" then
--Code Here
end
end) |
|
|
game.Players.PlayerAdded:connect(function(player)
repeat wait() until player.Character ~= nil
wait();
player.CameraMode = ("LockFirstPerson")
player.Character.Humanoid:MoveTo(Vector3.new(139.4, 1, -58.2))
end) |
|
|
BrickColor = BrickColor.Random()
Color = BrickColor.Color
while wait(3) do
t.TextColor3 = Color
end
Try that. |
|
|
It personally hasn't worked all of the times I've tried it, I confused with the model :MoveTo() for a moment, have you tried using WalkToPoint?. |
|
|
In this case, "hit" should return "nil". |
|
|
However, if you were using a LocalScript, you could try something such as,
Player = game.Players.LocalPlayer
Player.PlayerGui.gui.MouseButton1Click:connect(function(hit)
game:GetService("TeleportService"):Teleport(123265322, Player)
end) |
|
|
Most of it is correct however,
You'll need to use something like,
SelectedMap = maps[map] to individually choose one.
Also, change math.random(#maps) to math.random(1, #maps). |
|
|
local ball = Workspace.energyorb1
local debounce = false
function OnTouched(other)
if other.Parent and game.Players:FindFirstChild(other.Parent) then
local player = game.Players:FindFirstChild(other.Parent)
player.leaderstats.Energy.Value = player.leaderstats.Energy.Value + 1
if a ~= nil and debounce == false then
debounce = true
end
end
end
ball.Touched:connect(onTouched)
|
|
|
Made a mistake,
local ball = Workspace.energyorb1
local debounce = false
function OnTouched(other)
if other.Parent and game.Players:FindFirstChild(other.Parent.Name) then
local player = game.Players:FindFirstChild(other.Parent.Name)
player.leaderstats.Energy.Value = player.leaderstats.Energy.Value + 1
if a ~= nil and debounce == false then
debounce = true
end
end
end
ball.Touched:connect(onTouched) |
|
|
How are you getting the "Camera"?. |
|
|
Alternatively as an example,
Player = game.Players.LocalPlayer
Projectile = WeaponProjectilePathHere
Projectile.Touched:connect(function(Target)
if Target.Parent and game.Players:FindFirstChild(Target.Parent.Name) then
Player.Stats.Value = Player.Stats.Value + 1
end
end)
|
|
|
Actually, a better example would be.
Player = game.Players.LocalPlayer
Projectile = WeaponProjectilePathHere
Projectile.Touched:connect(function(Target)
if Target.Parent and game.Players:FindFirstChild(Target.Parent.Name) and Target.Parent.Humanoid.Health <= 0 then
Player.Stats.Value = Player.Stats.Value + 1
end |
|
|
Either method would work, it's just a matter of preference, circumstance and use. |
|