You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
for when i click the gui to show the amount increased -
What is the issue? Include screenshots / videos if possible!
when i click no amount increases it, but it prints the player, the table its in and the value, but the amount does not change on the gui -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i have tried the creators discord, the tutorial, and on google
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
this is the click script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local Remotes = ReplicatedStorage.Remotes
local Pets = require(ServerScriptService.Pets)
local PlayerData = require(ServerScriptService.PlayerData.Manager)
local AchievementsManager = require(ServerScriptService.Achievements)
local AchievementsConfig = require(ReplicatedStorage.Configs.Achievements)
local Stats = require(ReplicatedStorage.Utils.Stats)
local Cooldown = {}
local CLICK_COOLDOWN = 0.5
local function Click(player: Player)
if table.find(Cooldown, player) then return end
local profile = PlayerData.Profiles[player]
if not profile then return end
table.insert(Cooldown, player)
task.delay(CLICK_COOLDOWN, function()
local foundPlayer = table.find(Cooldown, player)
if foundPlayer then
table.remove(Cooldown, foundPlayer)
end
end)
local achievementId = AchievementsConfig.GetFirstAvailableAchievementId("Clicks", profile.Data)
if achievementId then
AchievementsManager.AddPoint(player, "Clicks", achievementId) << amount but no increase
print(player, "Clicks", achievementId, 1)
end
local clickMultiplier = Stats.ClickMultiplier(player, profile.Data)
local reward = clickMultiplier
PlayerData.AdjustClicks(player, reward)
Pets.GivePetXP(player)
end
Remotes.Click.OnServerEvent:Connect(Click)
addpoint function
function Achievements.AddPoint(player: Player, group: string, id: string, amount: number?)
amount = amount or 1
local config = AchievementsConfig.GetAchievementConfig(group, id)
if not config then return end
local profile = PlayerData.Profiles[player]
if not profile then print("No Profile") return end
local groupData = profile.Data.Achievements[group]
if not groupData then return end
local achievementData = groupData[id]
if not achievementData then return end
local isCompleted = achievementData.Progress >= config.Amount
if not isCompleted then return end
achievementData.Progress += amount
Remotes.UpdateAchievement:FireClient(player, group, id, achievementData.Progress)
end