So im trying to make an Admin Only GUI that will affect a certain block within my game. The problem im having is im trying to have a textbox with an inputted text, then upon pressing the button beside it, the color of the block will change. However, It does not.
What ive done: - Placed a Color3 Value within the part - Have a local script with the following code in the button:
script.Parent.MouseButton1Click:Connect(function()
local rep = game:GetService("ReplicatedStorage")
local text = script.Parent.Parent.Text
local value = workspace.RenderedVisualiserPart.ColorValue
rep.ColorRemote:FireServer(script.Parent.Parent.Text)
value.Value = Color3.fromRGB(text)
end)
I have a remote within ReplicatedStorage called "ColorRemote" The remote is fired by the click, then sent to the following code
ReplicatedStorage.ColorRemote.OnServerEvent:Connect(function(Player,SupportedArgument)
for i,v in pairs(AllowedUserIds) do
if Player.UserId ~= v then
else
while true do
wait(0.1)
local text = game.StarterGui.AdminPanel.AdminGUI.MainFrame.Color.Text
local colorValue = workspace.RenderedVisualiserPart.ColorValue
colorValue.Value = Color3.fromRGB(text)
--local colorval = game.StarterGui.AdminPanel.AdminGUI.MainFrame.Color.Text
-- local visPart = workspace:FindFirstChild("RenderedVisualiserPart")
workspace.RenderedVisualiserPart.Color = colorValue.Value
end
end
end
end)
After trying numerous ways to potentially do this, the text from the "Textbox" does not get sent to the Color3Value I have to be able to change the Part color. If you are able to help, please do. If you need more details, Send me a friend Request on Discord. My Tag is: Oblivion?#0003
Thanks!
For an easier version, how can I turn the text value into the RGB. Since
Color3.fromRGB(text) wouldnt work

2 comments
But how would I take the text from the InputBox to use as the color value to change to? Ive tried to do parent.Text, and nothing would work
On the button script, i tried doing
script.Parent.MouseButton1Click:Connect(function() local inputText = game.StarterGui.AdminPanel.AdminGUI.MainFrame.Color.Text local rep = game:GetService("ReplicatedStorage") local Color2ChangeTo = Color3.fromRGB(inputText) rep.ColorRemote:FireServer(Color2ChangeTo) end)