ChangeSizeScript Not working

Didn’t seem to work, want a copy of the place?

Any errors? Also where are you putting the LocalScript?

This isn’t a localscript haha, its a serverscript and this error ServerScriptService.TeamScripts.ResetTeamSize:31: attempt to index nil with ‘CharacterAdded’

Ohhhh, my bad. Let me change the example.

Ok lets try this example:

function ChangeCharacter(LocalPlayer,Character)
    if LocalPlayer.CurrentTeam.Value == "Kid" then
			print("hi")
			Character.Humanoid:WaitForChild("BodyWidthScale").Value = 0.6
			Character.Humanoid:WaitForChild("BodyDepthScale").Value = 0.6
			Character.Humanoid:WaitForChild("BodyProportionScale").Value = 0
			Character.Humanoid:WaitForChild("BodyTypeScale").Value = 0
			Character.Humanoid:WaitForChild("HeadScale").Value = 0.6
			Character.Humanoid:WaitForChild("BodyHeightScale").Value = 0.6
			print("hi2")
		elseif LocalPlayer.CurrentTeam.Value == "Teen" then
			Character.Humanoid:WaitForChild("BodyWidthScale").Value = 0.9
			Character.Humanoid:WaitForChild("BodyDepthScale").Value = 0.9
			Character.Humanoid:WaitForChild("BodyProportionScale").Value = 0
			Character.Humanoid:WaitForChild("BodyTypeScale").Value = 0
			Character.Humanoid:WaitForChild("HeadScale").Value = 0.9
			Character.Humanoid:WaitForChild("BodyHeightScale").Value = 0.9
		elseif LocalPlayer.CurrentTeam.Value == "Parent" then
			Character.Humanoid:WaitForChild("BodyWidthScale").Value = 1
			Character.Humanoid:WaitForChild("BodyDepthScale").Value = 1
			Character.Humanoid:WaitForChild("BodyProportionScale").Value = 0
			Character.Humanoid:WaitForChild("BodyTypeScale").Value = 0
			Character.Humanoid:WaitForChild("HeadScale").Value = 1
			Character.Humanoid:WaitForChild("BodyHeightScale").Value = 1
		end
end

game.Players.PlayedAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character)
        ChangeCharacter(Player,Character)
    end)
end)

Doesn’t seem to work, would you like a copy so you can see for yourself?

Are you getting any errors? I don’t have access to studio at this time and point.

PlayedAdded is not a valid member of Players “Players”

Are your there? Because I need to get to bed soon

Alright, send me a place file and I’ll take a look, I now have access to Studio.

Testing.rbxl (549.7 KB)

You probably mistyped the event name. It is PlayerAdded.

i’ll test it. Thanks for letting us know! EDIT: DOESNT WORK AND YOU GET THIS ERROR Humanoid is not a valid member of Model “Workspace.Kevblx”

Try using WaitForChild for humanoids. It sometimes doesn’t work without it.

It now prints both hi’s without any changes, but it does not keep the same size

function ChangeCharacter(LocalPlayer,Character)
   if LocalPlayer.CurrentTeam.Value == "Kid" then
   	print("hi")
   	Character.Humanoid:WaitForChild("BodyWidthScale").Value = 0.6
   	Character.Humanoid:WaitForChild("BodyDepthScale").Value = 0.6
   	Character.Humanoid:WaitForChild("BodyProportionScale").Value = 0
   	Character.Humanoid:WaitForChild("BodyTypeScale").Value = 0
   	Character.Humanoid:WaitForChild("HeadScale").Value = 0.6
   	Character.Humanoid:WaitForChild("BodyHeightScale").Value = 0.6
   	print("hi2")
   elseif LocalPlayer.CurrentTeam.Value == "Teen" then
   	Character.Humanoid:WaitForChild("BodyWidthScale").Value = 0.9
   	Character.Humanoid:WaitForChild("BodyDepthScale").Value = 0.9
   	Character.Humanoid:WaitForChild("BodyProportionScale").Value = 0
   	Character.Humanoid:WaitForChild("BodyTypeScale").Value = 0
   	Character.Humanoid:WaitForChild("HeadScale").Value = 0.9
   	Character.Humanoid:WaitForChild("BodyHeightScale").Value = 0.9
   elseif LocalPlayer.CurrentTeam.Value == "Parent" then
   	Character.Humanoid:WaitForChild("BodyWidthScale").Value = 1
   	Character.Humanoid:WaitForChild("BodyDepthScale").Value = 1
   	Character.Humanoid:WaitForChild("BodyProportionScale").Value = 0
   	Character.Humanoid:WaitForChild("BodyTypeScale").Value = 0
   	Character.Humanoid:WaitForChild("HeadScale").Value = 1
   	Character.Humanoid:WaitForChild("BodyHeightScale").Value = 1
   end
end

game.Players.PlayerAdded:Connect(function(Player)
   Player.CharacterAdded:Connect(function(Character)
   	ChangeCharacter(Player,Character)
   end)
end)

The client is the reason why it is not working. You want it to work via the server but there will be no changes for the server. I think you should use a RemoteEvent for this.

I tried before, so I would need some example code for this.

He is using a server script…

Hey did you get a chance to look at it?

Sorry for the late reply, this post may help you.