So far this is my script for the part. It works just fine but I'm trying to add a 2x points gamepass.
local part = script.Parent
local canGet = true
local function onTouch(otherPart)
local humanoid = otherPart.Parent:FindFirstChild('Humanoid')
if humanoid then
local player = game.Players:FindFirstChild(otherPart.Parent.Name)
if player and canGet then
canGet = false
player.leaderstats.Points.Value = player.leaderstats.Points.Value + 30
wait(60) -- Cooldown between each point increase
canGet = true
end
end
end
part.Touched:Connect(onTouch)

1 comment
Hi thanks for helping, I tried using OwnsGamepassAsync but it still seems like it doesnt want to work. Probally just my bad scripting but yeah.