My code is underlined with orange but there’s nothing wrong with it
Here is my code
-- local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local Remotes = ReplicatedStorage.Remotes
local PlayerData = require(ServerScriptService.PlayerData.Manager)
local function Click(players: Player)
PlayerData.AdjustClicks(player, 1)
end
Remotes.Click.OnServerEvent:Connect(Click)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local Remotes = ReplicatedStorage.Remotes
local PlayerData = require(ServerScriptService.PlayerData.Manager)
local function Click(player) -- It said players and not player. So that caused it to error. Also there is no need to add a :Player because player will always be a player no matter what.
PlayerData.AdjustClicks(player, 1)
end
Remotes.Click.OnServerEvent:Connect(Click)