When I try to get a random tool aka child i get an error
Players.Danglt.Backpack.Remote.Tool:14: attempt to index field 'random' (a function value)
local crate2 = storage.Crate:Clone() for i,v in pairs(storage.rewards:GetChildren()) do local reword = v[math.random[1]]:Clone() reword.Parent = crate2.Reward crate2.Parent = workspace crate2.Configurations.Owner.Value = plr.Name for i = 1,1 do -- Replace 100 with an increment of times crate2.Base:SetPrimaryPartCFrame(char.Torso.CFrame + Vector3.new(10,10,0)) end
[] is for index,
() is for function,
so it should be, math.random(1)