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

how can i change studs offset for cloned billboard gui?

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

✓ Accepted answer

Maybe try this

 clonedHiTime.StudsOffset = Vector3.new(0,5,0)

1 comment

0

that works thanks

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