Attempt to call a rbxscriptsignal value

Im trying to make a system where you can pull a gun from a vehicles trunk w/o duplicates.

I have checked around devforum to no avail (to be honest, your probably gonna find something on the devforum that i didnt :p)

– start of script
local ClickDetector = script.Parent.ClickDetector
local canGiveGun = true
ClickDetector.MouseClick(function(player)
– no idea why but broken line 3 “attempt to call a rbxscriptsignal value”

local backpack = player.Backack
local gun = game.ServerStorage["AR-15"]
local gunClone = gun:Clone()
for i,v in pairs(backpack:GetChildren()) do 
	if v.Name == "AR-15" then
		print("you have a gun, lol")
	end
end
if canGiveGun then
	gunClone.Parent = backpack
end
canGiveGun = true

end)

I’d like to point out that it says in your code

local backpack = player.Backack

Instead of

local backpack = player.Backpack
1 Like

nice, nice. how exciting is that to see!! i will fix that tommorow and see how that works. (i bet it will fix it)

You need to change that to:

ClickDetector.MouseClick:Connect(function(player)
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.