Okay So I was making a gui text button that once it is pressed it will change the color of another part. It is simple yet I’m dumb to not make it work.
local Gui = script.Parent
local Remote = game.ReplicatedStorage:WaitForChild("BrickColorRemote")
local Frame = Gui.Frame
local Button = Frame.BrickColorButton
Button.MouseButton1Click:Connect(function()
Remote:FireServer(Color3.fromRGB(255,0,0))
end)
Well, Remote Rvents are unecessary for what OP needed. I don’t get why everyone wants to use Remote Events for everything, when there are simpler options - and this goes for other posts as well.
And don’t get me wrong, I love using Remote Events and know them well - but when it’s just like what OP wanted, there’s no need to use a server-side script to simply change the color of a part in the Workspace.
But anyways, I’m glad it got fixed! Have a good day/week everyone!
You don’t need the ClickDetector at all, and just be aware this only changes the part colour on the client who has the Gui - everyone else in the game will still see the old part colour.
Also remember to use three backticks - \`\`\` - to enclose your code to make it readable,
I didn’t use remotes because I don’t know how to use them. But I’m learning new things everyday.
also keep in Mind It’s been only a week since I’ve been learning Lua.