so im not sure whats happening
heres the code in a normal script
script.Parent.Plr1.OnServerEvent:Connect(function(player)
if game.Players:FindFirstDescendant("PLR1VAL") then
script.Parent.Sound:Play()
else
local cheese = Instance.new("IntValue")
cheese.Parent = player
cheese.Value = 1
cheese.Name = "PLR1VAL"
end
end)
For some reason, there have been lots of issues with FindFirstDescendant. I recommend using game.Players:FirstFirstChild("PLR1VAL", true), as setting the recursive paramater to true searches all descendants rather than only the immediate children.