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 comment
that works thanks