So I'm making a Roblox game where you collect orbs that give you 1 power (a leader stats value), and a punch tool where whenever you punch, the punch strength goes up by 1 every power you get, so basically 1 power = 1 extra damage per hit, the only problem is after the remote event is triggered, for some reason my multiplier isn't working, can someone please help!
Local script (working but just for extra detail):
Player = game.Players.LocalPlayer
repeat wait() until Player.Character
Character = Player.Character
mouse = Player:GetMouse()
Tool = script.Parent
multiplier = 1
Enabled = true
Tool.Activated:Connect(function()
if Enabled == true then
script.Function:FireServer(game.Players.LocalPlayer, "Combat", multiplier, Player.leaderstats.Power.Value, Character.HumanoidRootPart.CFrame*CFrame.new(0,0,-2).p)
end
end)
Script (the thing I'm having a problem with):
Enabled = true
script.Parent.OnServerEvent:Connect(function(Player, Action, m,Power, V1)
local c = Player.Character
local dmg = c.Humanoid.Health = player.Character.Humanoid.Health - Power * m
if Enabled == false then return end
if Action == "Combat" then
local Track = Instance.new("Animation")
Track.AnimationId = "rbxassetid://6024898273"
local Anim = c.Humanoid:LoadAnimation(Track)
Anim:Play()
local Region = Region3.new(V1-Vector3.new(2,2,2),V1+Vector3.new(2,2,2))
local RTable = workspace:FindPartsInRegion3(Region, nil, 20)
for i,v in pairs(RTable) do
if v.Parent:findFirstChild("Humanoid") and v.Parent:findFirstChild("Deb") == nil and v.Parent ~= c then
local Deb = Instance.new("BoolValue", v.Parent)Deb.Name = "Deb"
game.Debris:AddItem(Deb,0.2)
v.Parent.Humanoid:TakeDamage(dmg)
end
end
end
end
end)
Output:
12:59:58.521 - Players.hoth7.Backpack.Tool.Main.Function.Script:7: Expected identifier when parsing expression, got '='
The line the problem is in is line 7. Help appreciated!

1 comment
The answer may seem obvious, but what identifier do they want me to put?