I am trying to create a GUI that lets players customize their shields in-game and I am having trouble getting it to work, so far I do not see any errors in the output, does anyone know what I am doing wrong?
Client Script
script.Parent.ShieldC.Black.MouseButton1Down:connect(function()
local Color2 = BrickColor.new("Lapis")
game.StarterGui.Menu.Sound.Click:Play()
local c = game.Workspace:FindFirstChild(Player.Name)
if c:FindFirstChild("ShieldModel") then
game.ReplicatedStorage.RemoteEvents:WaitForChild("changeColor"):FireServer(Player, Color2, c)
end
end)
Server Script
game.ReplicatedStorage.RemoteEvents:WaitForChild("changeColor").OnServerEvent:Connect(function(Player, Color2, c)
c.ShieldModel.Main.BrickColor = Color2
end)
local PlayerGUI = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
local StarterGui = game:GetService("StarterGui")
-- random code filling here
game.Players.LocalPlayer.PlayerGui.Menu.Sound.Click:Play()