alright so script clones Local Part inside workspace. The script gets the player, but how to check if the part has been hit by the player?
local Coins = workspace.Coins:GetChildren()
local player = game.Players.LocalPlayer
print(player)
for i, v in pairs(Coins) do
if v.Name == "CoinGet" then
v.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and
game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then
game.ReplicatedStorage.Event:Fire()
v:Destroy()
end
end)
end
end
If this is confusing then imagine this
player = Player1
script.parent.touched:connect(function()
-- checks if Player1 touched the part
print("a")
end)
How can you check if the given player has touched the part? If player1 touched the part it will print a, but if player 2 or any other player toches the part it wont do anything

1 comment
Hi again. Could I ask why you unaccepted my answer?