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

Incomplete statement: expected assignment or a function call?

Asked by
3wdo 198
4 years ago

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

Log in to vote
1
Answered by 4 years ago

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)

Ad

Answer this question