I don't know where to put this script

Hello,

Does anyone know where i have to put this script, to make the avatar bigger every second.

local scaleFactor = 0.1 -- the amount to increase the scale every second

while true do
    wait(1) -- wait for one second
    
    -- increase the scale of the avatar
    scale = scale + scaleFactor
    
    -- apply the new scale to the avatar
    game.Players.LocalPlayer.Character.Humanoid.BodyScale.Value = scale
end
3 Likes

I’m assuming it’s a localscript as you use .LocalPlayer, so you can put it in any client replicated service as StarterPack or StarterGui.

Hope this helps!

I tried putting the script in a LocalScript, and then in Starterpack and it didn’t work, i also tried putting it in StarterGui but it didn’t work either.

what does scale = scale mean? you have no variable called scale

1 Like

I don’t know how to script it properly so i used ChatGBT, don’t laugh.

Put this in a local script in StarterPlayerScripts

Also didn’t work, do i have to set the charachter to R15 or R6, does that make a difference?

it won’t work because as CreepyDev said the script is wrong scale is not defined

Do you have an idea on how to make the script work?

game.player.playeradded:Connect(function(player)
player.Characteradded:Connect(function(Charcater)
while true do
    wait(1) 
for i,v in pairs(character:Getdescendants())do 
v.Size = v.Size + 0.1
end
1 Like

like this maybe and put it in serverscriptservice (Wrote the script without studio may not work)

1 Like

As a Normal Script or LocalScript?

1 Like

Normal also im fixing it up in studio rn

1 Like

Are you trying to make the character change size for the entire server or just that player?

1 Like

bro please don’t use chatgpt for codes.

1 Like

Yes, i’m trying to make it for the entire server.

Unfortunately, i’m not that good at coding, so i don’t have any other choice.

I think if you just initialize scale to 1 before entering the while loop this would work. Not too familiar with scaling r15 though.

Something like:

local scale = 1
local scaleFactor = 1.1

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		while true do
			wait(1) 
			local Humanoid = character.Humanoid
			Humanoid.HeadScale.Value *= scaleFactor
			Humanoid.BodyDepthScale.Value *= scaleFactor
			Humanoid.BodyWidthScale.Value *= scaleFactor
		 	Humanoid.BodyHeightScale.Value *= scaleFactor
		end
	end)
	end)

Here is a fully working code put it in a Script NOT a LocalScript inside of ServerScriptService
Hope this helped :grin:

2 Likes

I don’t know what i’m doing wrong, but if i test it i still won’t get bigger. I’m currently using R6 btw, as soon as i’ve put in the script and then play test, it doesn’t show up in ServerScriptService.