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

colour changes once but then doesnt?

--localscript--
script.Parent.MouseButton1Click:Connect(function()
	if script.Parent.Check.Value == true Then
		game.ReplicatedStorage.Event:FireServer(script.Parent, script.Parent.Check.Value)
	end
end)
--server--
game.ReplicatedStorage.Event.OnServerEvent:Connect(function(player, Button, Check)
	if Check == true then
		Buttoon.BackgroundColo3 = Color3.fromRGB(30,30,30)
	end
end)

it changes the colour first time but it wont after that idk why. the gui is only local.

1 comment

0

When you edit a Gui you should keep it on the client. No need for a remote event. You also has misspelled properties on line 4 of the server code block.

1 answer

✓ Accepted answer

line 4 second script

Button.BackgroundColor3 = Color3.fromRGB(30,30,30)
wait()-- enter how much time to wait
Button.BackgroundColor3 = Color3.fromRGB() -- enter second color

also you need to just not use that remote event because it will not change the button color in a real game

1 comment

0

alright ok. ty for this

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