Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

I want the value to be just 1 instead of adding 1 but it can't figure it out?

Here is my script~~~~~~~~~~~~~~~~~game.Players.PlayerAdded:Connect(function(player) player.Chatted:Connect(function(msg) local character = player.Character local hum = character.Humanoid

	local BodyDepthScale = hum.BodyDepthScale
	local BodyHeightScale = hum.BodyHeightScale
	local BodyTypeScale = hum.BodyTypeScale
	local BodyWidthScale = hum.BodyWidthScale
	local HeadScale = hum.HeadScale
	if msg == "!WeirdMe 1" then
	local	BodyDepthScale.Value = BodyDepthScale.Value + 1
	end
end)

end)

I don't want the value to keep on adding on I just want it to be 1 but if I put = it would error.

2 comments

0

remove the local behind it

0

and remove = BodyDepthScale.Value + 1 and put = 1 instead

1 answer

    if msg == "!WeirdMe 1" then
    BodyDepthScale.Value = 1

this is how it should look like at the end

2 comments

0

sets the value to 1 instead of adding 1

0

In other words, remove the "local" from line 7

This discussion is preserved as it was. New answers, comments, and votes are closed.