So UpgradeWeapon is a stringvalue and this is my script in serverscriptservice. Why does it return this error? How can I access the part?
ServerScriptService.Upgrade Handler.Main:12: invalid argument #2 (string expected, got Instance)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvent = ReplicatedStorage:WaitForChild("UpgradeEvent")
local function upgrade(player,UpgradeWeapon,UpgradeAmount)
local Weapon = UpgradeWeapon
print ("Upgrade Event Recieved")
player.Inventory[Weapon].Damage.Value = player.Inventory[UpgradeWeapon].Damage.Value + UpgradeAmount
end
remoteEvent.OnServerEvent:Connect(upgrade)

1 comment
Could you give the local script that fires the event bc we dont know what the variables are without it.