Function is not a valid member of LocalScript "Players.ZensStarz.Backpack.Main"

Long story short I have been following MapleGalaxy’s tutorial and seem to not be able to get beyond this issue and I currently see no work arounds to it due to this being Region3, if I just removed it the hitbox might act a little bit funky, so yeah.

repeat wait() until Player.Character
Character = Player.Character
mouse = Player:GetMouse()
Enabled = true
local UIS = game:GetService("UserInputService")

UIS.InputBegan:Connect(function(input, IsTyping)
	
	if IsTyping then
		return
	elseif input.UserInputType == Enum.UserInputType.MouseButton1 then
		if Enabled == true then
			script.Function:FireServer("Combat", Character.HumanoidRootPart.CFrame*CFrame.new(0,0,-2).p)
		end
	end
end)
1 Like

There is no Instance named “Function” in “Main” in your backpack. Can you show me other scripts?

Like the actual other scripts (as in what is inside) or just the other scripts in their places?

Any Instance. Instance are things usually shown in the explorer window.

I mean show me scripts where the error is

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local HRP = Character:WaitForChild("HRP")
local Mouse = Player:GetMouse()
local Enabled = true
local UIS = game:GetService("UserInputService")
local RS = game:GetService("ReplicatedStorage")
local RE = RS:WaitForChild("Function")

UIS.InputBegan:Connect(function(Input, Processed)
	if Processed then
		return
	end
	if Input.UserInputType == Enum.UserInputType.MouseButton1 then
		if Enabled then
			local CFrames = HRP.CFrame * CFrame.new(0, 0, -2)
			RE:FireServer("Combat", CFrames)
		end
	end
end)

Move the RemoteEvent instance named “Function” to the ReplicatedStorage folder and try the above script.

I realized this once I woke up and I feel so dumb. Well, sorry for wasting your time.