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

Incomplete statement: expected assignment or a function call?

so i am making a prototype for titan shifting (you will know what i am doing if you watched the anime attack on titan) and i made it work but i want the bigger size to be better with smaller script. so i am adding 0.1 size to the characters scale

game.ReplicatedStorage.titanshifted.OnServerEvent:Connect(function(player)
	local bds = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyDepthScale
local bhs = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyHeightScale
local bps = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyProportionScale
local bts = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyTypeScale
local bws = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyWidthScale
local hs = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").HeadScale
	print(player.name.." Titan Shifted")
	wait(3)
	while true do
			wait(0.1)
	bds.Value + 0.1
	bhs.Value + 0.1
	bps.Value + 0.1
	bts.Value + 0.1
	bws.Value + 0.1
	hs.Value + 0.1
	end
end)


1 answer

✓ Accepted answer

I believe you have to define the value before changing it, so it might look like this

game.ReplicatedStorage.titanshifted.OnServerEvent:Connect(function(player)
    local bds = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyDepthScale
local bhs = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyHeightScale
local bps = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyProportionScale
local bts = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyTypeScale
local bws = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").BodyWidthScale
local hs = game.Workspace:FindFirstChild(player.name):WaitForChild("Humanoid").HeadScale
    print(player.name.." Titan Shifted")
    wait(3)
    while true do
           wait(0.1)
   	 bds.Value = bds.Value + 0.1
     bhs.Value = bhs.Value + 0.1
   	 bps.Value = bps.Value + 0.1
   	 bts.Value = bts.Value + 0.1
   	 bws.Value = bws.Value + 0.1
   	 hs.Value = hs.Value + 0.1
    end
end)

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