local plr = game.Players.LocalPlayer

repeat wait() until plr.Character

local char = plr.Character
local scp = script.BallScript

print(script.BallScript.Name)

local deb = true

script.Parent.Activated:connect(function()
	if deb then

		deb = false

		if char:FindFirstChild("BSFolder") == nil then

			local folder = Instance.new("Folder", char)

			folder.Name = "BSFolder"

			local numval = Instance.new("NumberValue", char.BSFolder)

			numval.Name = "BallCount"

		end

		print("Tool Activated!")

		local clone = scp:Clone()

		clone.Parent = char.BSFolder

		clone.Disabled = false

		wait(5)

		deb = true

		print("Tool is ready again!")

	end

end)


https://gyazo.com/50215eafcefcf4ea960656d5759104a9

It does work in studio, not ingame.

3 comments

1

Try doing a WaitForChild on line three and add an "or plr.CharacterAdded:wait()" on the same line but after the code on line 2 . Not saying the will fix your script but it could cause problems in the future.

0

I just waited for the Character, ty for the hint ;o

0

You're welcome.