Hello everybody!
I’ll try explaining this as best as i can, so basically, i’m trying to make it so when you click the UI button it removes the shadows and turns materials to smooth plastic.
My script works perfectly as i use a Remove event that (I have already tested it out), only affect the local player and not the server,but the problem is that even though it works perfectly, the output sends this error:
These are my scripts:
Local Script
local Remote = game.ReplicatedStorage.Remotes.Performance
local lowBtn = game.Players.LocalPlayer.PlayerGui.QualitySelect.BaseFrame.LowEnd.Frame.Folder.LowAccept
lowBtn.MouseButton1Up:Connect(function(player)
Remote:FireServer(player)
local function Testy(player)
local Lighthing = game:GetService("Lighting")
Lighthing.GlobalShadows = false
for i,v in pairs(game.Workspace.Folder:GetChildren()) do
v.Material = Enum.Material.SmoothPlastic
end
end
Remote.OnClientEvent:Connect(Testy())
end)
Script:
local Remote = game:GetService("ReplicatedStorage").Remotes.Performance
local function Test(player)
Remote:FireClient(player)
end
Remote.OnServerEvent:Connect(Test)
Can someone help me understand what’s causing the output to say that?
Also sorry if it’s something obvious, i’m just learning how to use remote events.