Ad
Log in to vote
0

Trying to make a lucky block that gives a random item every 5min but it only works in studio?

Asked by 23 days ago

local Handle = game.Workspace.Handle local RandomItemGiver = game.Workspace.RandomItemGiver local BarrierLucky = game.ReplicatedStorage.BarrierLucky

script.Parent.Triggered:Connect(function(player) local loot = game.ReplicatedStorage.Loot:GetChildren() local chosenloot = loot[math.random(1,#loot)] chosenloot:Clone().Parent = player.Backpack wait(0.1) BarrierLucky.Parent = game.Workspace Handle.Parent = game.ReplicatedStorage.luckyblock RandomItemGiver.Parent = game.ReplicatedStorage.luckyblock wait(300) -- 300 sec (5min) BarrierLucky.Parent = game.ReplicatedStorage Handle.Parent = game.Workspace RandomItemGiver.Parent = game.Workspace end)

0
Restart studio and maybe even your computer blue_bunny0fficl 98 — 23d
0
Try checking the Developer console for errors while in the game. DindinYT37 212 — 22d

Answer this question