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

how can i change studs offset for cloned billboard gui?

Asked by 4 years ago

im making custom overhead gui and everything is fine but i get an error that says

Y cannot be assigned to

and i dont know why

(line 20)

local gui = game:GetService("ServerStorage"):WaitForChild("OverheadGui")

game.Players.PlayerAdded:Connect(function(player)

    local leaderstats = player:WaitForChild("leaderstats")
    local hTime = leaderstats:WaitForChild("Highscore")
    local Time = leaderstats:WaitForChild("Time")

    player.CharacterAdded:Connect(function(character)

        --NAME TAG
        local clonedNameTag = gui:Clone()
        clonedNameTag.TextLabel.Text = player.Name
        clonedNameTag.Parent = game.Workspace:WaitForChild(player.Name).Head
        clonedNameTag.StudsOffset.Y = 2.5

        --TIME VALUE
        local clonedHiTime = gui:Clone()
        clonedHiTime.Parent = game.Workspace:WaitForChild(player.Name).Head
        clonedHiTime.StudsOffset.Y = 5
        --/changing value
        clonedHiTime.TextLabel.Text = hTime

        hTime.Changed:Connect(function()
            clonedHiTime.TextLabel.Text = hTime
        end)

    end)

end)

1 answer

Log in to vote
1
Answered by 4 years ago

Maybe try this

 clonedHiTime.StudsOffset = Vector3.new(0,5,0)
0
that works thanks Fr0stPh3onix 79 — 4y
Ad

Answer this question