So I have tried to work on the item that can be collected in a collect-a-thon however it's still not functioning the way I need it to,
the script is as follows:
local db = true
local itemGot = false
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then -- check if a player has hit the object
if db == true and itemGot == false then
db = false
script.Parent.Transparency = 0.125
script.Parent.CanCollide = false
script.Parent.Color = Color3.new(75,75,75)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.leaderstats2.Clapperboards.Value = player.leaderstats2.Clapperboards.Value + 1
itemGot = true
end
wait(2)
db = true
end
end)
The idea is once player 1 (the first player to collect it) has got the item said player 1 can't get that item again, however any other players that are on the server who haven't collected this item can still get it.
Note: I have added another variable to try and see if it would work but the script stops any other players collecting once player 1 collects it.

4 comments
So to make it clear what I want the script to do. Let's say you have a server of 8 players and 1 player collects the item. I still want the other 7 players to be able to collect the item but not the 1 player that collected it.
If you mean for the item to disappear (or transparent to .125), be non-collectible, and color change ONLY for the person who touches it. I would suggest Remote Events
Please give us more context, are there going to be more than 1 of this object? Does it need to be saved or just stay that way until the player joins again?
ok Dino, so the idea of the item is like the stars in Mario 64 (I haven't got a save feature yet and the +1 on the leader stats is to check that it works)