Hello there, Alright so sorry if this is a dumb question im tired but while I was scripting a gun I got this error: 14:42:57.370 Players.ThoseNamesAreGood.Backpack.MA5C AR.Client:29: Expected ‘end’ (to close ‘function’ at column 32),
This is my script:
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Activated = false
local OnAnimation = script.Parent.Server.OnAnimation
local OnReload = script.Parent.Server.OnReload
local AR = script.Parent
local function Equipped()
OnAnimation:FireServer()
end
local function OnActivated()
Activated = true
while wait() and Activated == true do
AR.Server.OnShootEvent:FireServer(AR.Handle.Position, Mouse.Hit.p, .2)
end
end
local function OnDeactivation()
Activated = false
end
script.Parent.Activated:Connect(function(OnActivated)
script.Parent.Deactivated:Connect(function(OnDeactivation)
script.Parent.Equipped:Connect(function(Equipped)
It has something to do with the local function but I can’t figure it out…
Any help is appreciated!