I am making a name changing gui for a Youtuber’s event where the player can
input a custom name and set the font and colour, everything works except for the colour bit itself.
local h = (math.pi - math.atan2(colourPickerCentre.Y - centreOfWheel.Y, colourPickerCentre.X - centreOfWheel.X)) / (math.pi * 2)
local s = (centreOfWheel - colourPickerCentre).Magnitude / (colourWheel.AbsoluteSize.X/2)
local v = math.abs((darknessSlider.AbsolutePosition.Y - darknessPicker.AbsolutePosition.Y) / darknessPicker.AbsoluteSize.Y - 1)
local hsv = Color3.fromHSV(math.clamp(h, 0, 1), math.clamp(s, 0, 1), math.clamp(v, 0, 1))
colourDisplay.BackgroundColor3 = hsv
That is a short section of the code which sets the text label’s colour to the colour in the colour wheel so the player can see which colour they have selected, all of this works except for the remote event which sets the player’s nametag colour to the chosen one.
(This is the remote event firing)
script.Parent.MouseButton1Click:Connect(function()
game.ReplicatedStorage.NameChange:FireServer(game.Players.LocalPlayer, script.Parent.Parent.Parent.CurrentColour.BackgroundColor3, script.Parent.Parent.Parent.NameInput.InputName.Text, script.Parent.Parent.Parent.NameInput.InputName.Font)
end)
(This is the actual script)
game.ReplicatedStorage.NameChange.OnServerEvent:Connect(function(_, player, colour, text, font)
player.Character.Head.Tag.Nametag.Text = text.." ("..player.Name..")"
player.Character.Head.Tag.Nametag.TextColor3 = Color3.fromHSV(colour)
player.Character.Head.Tag.Nametag.Font = font
end)
It comes up with an error saying color3.fromHSV requires 3 arguments.