So this is the local script
script.Parent.MouseButton1Click:Connect((function() local location = game.Players.LocalPlayer.PlayerGui.MaterialGui.Frame game.ReplicatedStorage.Materials:FireServer(location) end))
And this is the main script
--Material Handler game.ReplicatedStorage.Materials.OnServerEvent:Connect(function(player,location) location.ScrollingFrame.Visible = true location.ScrollingFrame.Close.MouseButton1Click:connect(function() location.ScrollingFrame.Visible = false end) location.ScrollingFrame.SmoothPlastic.MouseButton1Click:connect(function() script.Material.Value = "SmoothPlastic" end) location.ScrollingFrame.Plastic.MouseButton1Click:connect(function() script.Material.Value = "Plastic" end) location.ScrollingFrame.CobbleStone.MouseButton1Click:connect(function() script.Material.Value = "Cobblestone" end) location.ScrollingFrame.Brick.MouseButton1Click:connect(function() script.Material.Value = "Brick" end) end)
It works in studio but not in game .Help please