Still have questions? Join our Discord server and get real time help.
0

# Points not given to my user only (points aren't given to me and only me) ?

I made a Points System for a cafe, when I tried to test it, I gave a tool to the owner and it worked but I didn't get a point, but then she gave me a tool and she got a point.

When I searched for the problem in the studio, I found a player in the players folder, the player had my name, I wasn't running the game in the studio, and it can't be removed, I am not sure how to fix it.

This is the Points System script:

local DataStoreService = game:GetService("DataStoreService")
local PointsStore = DataStoreService:GetDataStore("PointsStore")

local SavedPoints = PointsStore:GetAsync(Player.UserId)

PointsValue.Name = "Points"

if SavedPoints ~= nil then
PointsValue.Value = SavedPoints
end

PointsValue.Changed:Connect(function(NewPoints)
PointsStore:SetAsync(Player.UserId, NewPoints)
end)
end)


This is the GiveItem script:

game.ReplicatedStorage.GivePlayerItem.OnServerEvent:Connect(function(Player, PlayerName)
if Player.Name ~= PlayerName then
local ToolToGive = Player.Character:FindFirstChildWhichIsA("Tool")
ToolToGive.Parent = game.Players[PlayerName].Backpack