Problems when using Script.Parent on "Local"

I’m trying to make it duplicatable, using 'Workspace" made it specific only

Take a picture of your explorer window list (the hierarchy) so we can see where your aircraft is.
This is easy stuff … we just have no clue what your hierarchy looks like.

The Explorer?
Screenshot 2023-09-20 162327

Keep in mind that using Workspace already works, but i need to make it duplicatable so i have to use script.parent thing or any other that works

Assuming the script is one of the two I can see …

local aircraft = script.Parent.Parent.Parent.Parent.Parent

This would end up right on Aircraft.

Possibly …
Toss in a task.wait(3) on the 1st line of this script.

It still doesn’t work and the F9 Logs aren’t showing Errors

If this is one of the two scripts you showed, this is right. Something else must be wrong.
Did you remove Archivable someplace … try the task.wait(3) thing.

unless this is the Setting script I can also see … you’re being a bit vague.

The script i showed is the Gear Script and not the Key Control Local Script

Then what I posted was right. Are you trolling?

Using the Wait(5) thing? Where do i put it?

No the Aircrafts Gear just doesn’t work somehow

I don’t know what’s going on here but

local bindableFunction = workspace.GlobalSpells.BindableFunction -- Find the BindableFunction object in the Workspace
local remoteFunction = workspace.GlobalSpells.RemoteFunction -- Find the RemoteFunction object in the Workspace
local RunService = game:GetService("RunService")
local isLocal = RunService:IsClient()
if isLocal then
	--print("local")	
	tablekeys2={
		["halos"]=function()if halos==nil then halos=game.ReplicatedStorage.Items.Halos.Icons:GetChildren() end return halos end,
		["food"]=function()if food==nil then  food=game.ReplicatedStorage.Items.Food.Icons:GetChildren() end return food end,
		["capes"]=function() if capes==nil then capes=game.ReplicatedStorage.Items.Capes.Icons:GetChildren() end return capes end,
		["amulets"]=function()if amulets==nil then amulets=game.ReplicatedStorage.Items.Amulets.Icons:GetChildren() end return amulets end,
		["helmets"]=function()if helmets==nil then  helmets=game.ReplicatedStorage.Items.Helmets.Icons:GetChildren() end return helmets end,
		["questitems"]=function()if questitems==nil then questitems=game.ReplicatedStorage.Items.QuestItems.Icons:GetChildren() end return questitems end,
		["pets"]=function()if pets==nil then pets=game.ReplicatedStorage.Items.Pets.Icons:GetChildren() end return pets end,
		["ranged"]=function()if rangedweapons==nil then rangedweapons=game.ReplicatedStorage.Items.Ranged.Icons:GetChildren()  end return rangedweapons end,
		["plants"]=function()if plants==nil then plants=game.ReplicatedStorage.Items.Plants:GetChildren() end return plants end,
		["armor2"]=function()if armor2==nil then armor2=game.ReplicatedStorage.Items.Armor2:GetChildren() end return armor2 end,
		["spear"]=function()if npcspears==nil then npcspears=ReplStor.Items.NPCItems.Spear:GetChildren() end return npcspears end,
		["swordsnpc"]=function()if npcswords==nil then npcswords=ReplStor.Items.NPCItems.Sword:GetChildren() end return npcswords end,
		["axe"]=function() if npcaxe==nil then npcaxe=ReplStor.Items.NPCItems.Axe:GetChildren() end return npcaxe end,
		["specialitems"]=function()if specitems==nil then specitems=game.ReplicatedStorage.Items.SpecialItems:GetChildren() end return specitems end,
		["staffs"]=function()if staffs==nil then staffs=game.ReplicatedStorage.Items.Staffs.Icons:GetChildren() end return staffs end,
		["armor"]=function()if armor==nil then armor=game.ReplicatedStorage.Items.Armor.Icons:GetChildren() end return armor end,
		["shields"]=function()if shields==nil then shields=game.ReplicatedStorage.Items.Shields.Icons:GetChildren() end return shields end,
		["bundles"]=function()if bund==nil then bund=ReplStor.Bundles:GetChildren() end return bund end,
		["spells"]=function()if spelt==nil then spelt=repspell.Spells:GetChildren() end return spelt end,
		["npcitems"]=function()if npcitem==nil then npcitem=ReplStor.Items.NPCItems:GetChildren() end return npcitem end,
		["npcswords"]=function()if npcsword==nil then npcsword=ReplStor.Items.Sword:GetChildren() end return npcsword end,
		["capetemp"]=function()if captemp==nil then captemp=ReplStor.CharacterSel.Agragor.CapeSlot:GetChildren() end return captemp end,
		["capestables"]=function()if capestables==nil then capestables=ReplStor.Items.Capes.Cape2:GetChildren() end return capestables end,
		["items"]=function()if items==nil then game.ReplicatedStorage.Items:GetChildren() end return items end,
		["haloobj"]=function()if haloobj==nil then haloobj=game.ReplicatedStorage.Items.Halos:GetChildren() end return haloobj end,
	}
	

	--function GetServertable(Key)
	--	--print(Key)
	--	if tablekeys2[Key] then
	--		return tablekeys2[Key]()
	--	else
	--		--print("Failed")
	--		return nil	
	--	end
	--end
	function dfg.Gettable(Key)
		if tablekeys2[Key] then
			return tablekeys2[Key]()
		else return nil	
		end
	end
	local bodytypeindex={}
	local chardt=game.ReplicatedStorage.CharacterDataTemplate:GetChildren()
	for i,body in pairs(chardt) do
		bodytypeindex[body.Name]={}
		for _,child in pairs(dfg.Gettable("bundles")) do
			if child:FindFirstChild(tostring(body))~=nil then
				for _,desc in pairs(child:FindFirstChild(tostring(body)):GetChildren()) do
					table.insert(bodytypeindex[body.Name],desc)
				end
			end
		end
	end
	for _,bodytypes in pairs(bodytypeindex) do
		tablekeys2[bodytypes]= function() return bodytypeindex[bodytypes] end
	end
else
--print("Notlocal")	
	function dfg.GetStable(Key)
		--print("StableCall")	
		local result=bindableFunction:Invoke(Key)
		--print(result)
		return result -- Invoke the RemoteFunction on the server with the table as an argument and get the response
	end
	tablekeys2={
		["halos"]=function()if halos==nil then halos=dfg.GetStable("halos") end return halos end,
		["food"]=function()if food==nil then  food=dfg.GetStable("food") end return food end,
		["capes"]=function() if capes==nil then capes=dfg.GetStable("capes") end return capes end,
		["amulets"]=function()if amulets==nil then amulets=dfg.GetStable("amulets") end return amulets end,
		["helmets"]=function()if helmets==nil then  helmets=dfg.GetStable("helmets") end return helmets end,
		["questitems"]=function()if questitems==nil then questitems=dfg.GetStable("questitems") end return questitems end,
		["pets"]=function()if pets==nil then pets=dfg.GetStable("pets") end return pets end,
		["ranged"]=function()if rangedweapons==nil then rangedweapons=dfg.GetStable("ranged")  end return rangedweapons end,
		["plants"]=function()if plants==nil then plants=dfg.GetStable("plants") end return plants end,
		["armor2"]=function()if armor2==nil then armor2=dfg.GetStable("armor2") end return armor2 end,
		["spear"]=function()if npcspears==nil then npcspears=dfg.GetStable("spear") end return npcspears end,
		["swordsnpc"]=function()if npcswords==nil then npcswords=dfg.GetStable("swordsnpc") end return npcswords end,
		["axe"]=function() if npcaxe==nil then npcaxe=dfg.GetStable("axe") end return npcaxe end,
		["specialitems"]=function()if specitems==nil then specitems=dfg.GetStable("specialitems") end return specitems end,
		["staffs"]=function()if staffs==nil then staffs=dfg.GetStable("staffs") end return staffs end,
		["armor"]=function()if armor==nil then armor=dfg.GetStable("armor") end return armor end,
		["shields"]=function()if shields==nil then shields=dfg.GetStable("shields") end return shields end,
		["bundles"]=function()if bund==nil then bund=dfg.GetStable("bundles") end return bund end,
		["spells"]=function()if spelt==nil then spelt=dfg.GetStable("spells") end return spelt end,
		["npcitems"]=function()if npcitem==nil then npcitem=dfg.GetStable("npcitems") end return npcitem end,
		["npcswords"]=function()if npcsword==nil then npcsword=dfg.GetStable("npcswords") end return npcsword end,
		["capetemp"]=function()if captemp==nil then captemp=dfg.GetStable("capetemp")  end return captemp end,
		["capestables"]=function()if capestables==nil then capestables=dfg.GetStable("capestables") 	end return capestables 	end,
		["items"]=function()if items==nil then items=dfg.GetStable("items") 	end return items 	end,
		["haloobj"]=function()if haloobj==nil then haloobj=dfg.GetStable("haloobj") end return haloobj end,
		--["weaponobj"]=function()if haloobj==nil then haloobj=dfg.GetStable("haloobj") end return haloobj end,

	}

	local bodytypeindex={}
	local chardt=game.ReplicatedStorage.CharacterDataTemplate:GetChildren()
	for i,body in pairs(chardt) do
		bodytypeindex[body.Name]=nil
		--for _,child in pairs(dfg.GetStable("bundles")) do
		--	if child:FindFirstChild(tostring(body))~=nil then
		--		for _,desc in pairs(child:FindFirstChild(tostring(body)):GetChildren()) do
		--			table.insert(bodytypeindex[body.Name],desc)
		--		end
		--	end
		--end
	end
	for _,bodytypes in pairs(bodytypeindex) do
		tablekeys2[bodytypes]= function() if bodytypeindex[bodytypes]==nil then bodytypeindex[bodytypes]=dfg.GeStable(bodytypes) end return bodytypeindex[bodytypes] end 
	end
	
	--function dfg.Gettable(Key)
	--	if tablekeys2[Key] then
	--		return tablekeys2[Key]()
	--	else return nil	
	--	end
	--end
	function dfg.Gettable(Key)
		--print("StableCall")	
		local result=bindableFunction:Invoke(Key)
		--print(result)
		return result -- Invoke the RemoteFunction on the server with the table as an argument and get the response
	end
	-- Do something that only works on the server
end

I said task.wait(3) … on top (first line) of the GearScript

Is it like this? Let me try that out
Screenshot 2023-09-20 165428

where did aircraft.Vehicle come from?

should be aircraft.TestVehicle.Gear

ooh so your gearscript tool requires an aircraft? You should probably connect to the Aircraft via object value
insertobject-> objectvalue ->objectvalue.Value=Aircraft
Then your reference would be to the value of that object value container. So that aircraft controller is for that craft.

I am using the Main right now. I’m gonna screenshot when i use Workspace and when i use Script Parent

Wait so i can put an Object Value inside the Aircraft and parent it there?

put the object value inside the tool that the player will equip so when the script resets the aircraft is not lost when the tool is equipped by a player.

And by the way here
This is when i used Workspace:WaitForChild(“Aircraft”):
Screenshot 2023-09-20 170016
And when i use Script Parent the Gear won’t make it transparent:
Screenshot 2023-09-20 165544