hello robloxians,
i made dialy chest system but when i’m trying to claim the chest is show me error.
here is the script of the chest:
local Values = script.Parent.Parent:WaitForChild("ValuesSettings")
local GroupID = 6615086
local TimeWait = 60*15
script.Parent.Touched:Connect(function(hit)
if hit:IsInGroup(GroupID) then
print("inside the group")
end
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if hit.Parent:FindFirstChild("Humanoid") ~= nil and hit:IsInGroup(GroupID) and Values.CanClaim.Value == true then
player.leaderstats.Coins.Value = player.leaderstats.Coins.Value + Values.GiveCoins.Value
Values.CanClaim.Value = false
Values.Text.Value = "You have to wait."
wait(TimeWait)
Values.CanClaim.Value = true
Values.Text.Value = "Members only."
end
end)
and here is the error:
thanks you all for help,
REALINONOOBYT.