So, I have a tool that has the children of "Local Script", "ClickEvent", and "Script".
But, whenever I go into ROBLOX and join the game, I get the tool, but it says that ClickEvent is not a child of the tool. Here is the clone script:
gps = game:GetService("GamePassService"); Tools = {"TNTTool"} -- Exact text-- Respawn_With_Tools = true; -- False if you don't want the people spawned with it. --MAKE SURE YOU PUT THE TOOLS IN THE LIGHTING id = script:WaitForChild("GamePassID"); -- Do not change game.Players.PlayerAdded:connect(function(Player) Player:WaitForDataReady() if gps:PlayerHasPass(Player , id.Value) then for i,v in pairs (game.Lighting:GetChildren()) do for a,c in ipairs (Tools) do if v:IsA'Tool' and v.Name:lower()==c:lower() then local adminTool = v:Clone() if Respawn_With_Tools==true then adminTool.Parent=Player.StarterGear adminTool:Clone().Parent=Player.Backpack elseif Respawn_With_Tools==false then adminTool.Parent = Player.Backpack end end end end end end)
Note: I own the gamepass and the name is spelt correctly, and I have a value in the script for the gamepass.