Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make it only happen to me not to all players?

Asked by
zle_n 9
5 years ago
Edited 5 years ago
game.Players.PlayerAdded:Connect(function(Player)
 Player.CharacterAdded:Connect(function(Character)
  local Humanoid = Character:WaitForChild('Humanoid')
  for i,Child in pairs(Humanoid:GetChildren()) do
   if Child:IsA('NumberValue') then
    if Child.Name == 'BodyHeightScale' then
        Child.Value = 2
    end
   end
  end
 end)
end)

-- (I tried making myself look different, and I think it would happen to other players aswell.)

1 answer

Log in to vote
-2
Answered by 5 years ago

Here

game.Players.PlayerAdded:Connect(function(Player)
if Player.UserId == game.CreatorId then
 Player.CharacterAdded:Connect(function(Character)
  local Humanoid = Character:WaitForChild('Humanoid')
  for i,Child in pairs(Humanoid:GetChildren()) do
   if Child:IsA('NumberValue') then
    if Child.Name == 'BodyHeightScale' then
        Child.Value = 2
    end
   end
  end
 end)
end
end)

0
Thanks! zle_n 9 — 5y
0
np maumaumaumaumaumau 98 — 5y
0
Where do I put my Name/Id zle_n 9 — 5y
0
You don't have to maumaumaumaumaumau 98 — 5y
View all comments (6 more)
0
o zle_n 9 — 5y
1
if YOU created the game it will work maumaumaumaumaumau 98 — 5y
1
if you didn't then change game.CreatorId to your UserID maumaumaumaumaumau 98 — 5y
0
It works based on who the creator of the game is. So if you put this script in a game you own, it will only work for you. WillieTehWierdo200 966 — 5y
1
correct maumaumaumaumaumau 98 — 5y
0
I can't believe you thought this was a valid answer in any shape/form. -1 for not giving an explanation at all. User#24403 69 — 5y
Ad

Answer this question