i am trying to recycle Kizzuny's "Blizzard staff [Revamp]" gear's script (the placement of the Projectiles and velocity) but the invoke doesn't work. :/
I don't really know what i am doing wrong but you guys can show me!
ServerScript:
local Part = Instance.new("Part") -- the part
Part.Size = Vector3.new(5,5,5)
Part.Color = Color3.fromRGB(255, 255, 0)
Part.Transparency = .3
Part.Shape = Enum.PartType.Ball
Part.Parent = workspace
Part.Anchored = false
Part.CastShadow = false
Part.CanCollide = false
local BodyVelocity = Instance.new("BodyVelocity")
BodyVelocity.Parent = Part
BodyVelocity.MaxForce = Vector3.new(1,1,1)*math.huge
BodyVelocity.P = 1000000
Part.Position = (Root.Position + Vector3.new(Random.new(tick()):NextInteger(-60, 60), Random.new(tick()):NextInteger(80, 100), Random.new(tick()):NextInteger(-60, 60)))
Part.CFrame = (CFrame.new(Part.Position, Tool.DirectionInvoker:InvokeClient(Player).Position)) * (CFrame.Angles(math.rad(90),math.rad(-90),math.rad(180))) -- ClientInvoke is going wrong
Part.Parent = workspace
BodyVelocity.Velocity = (Part.Position - Tool.DirectionInvoker:InvokeClient(Player).Position).Unit * -125
end
LocalScript:
local DirectionInvoker = Tool:WaitForChild("DirectionInvoker", 10)
DirectionInvoker.OnClientInvoke = function()
local NewPlayer = game.Players.LocalPlayer or Player
if NewPlayer and NewPlayer:IsA("Player") then
local Mouse = NewPlayer:GetMouse()
if Mouse then
local Table = {
Hit = Mouse.Hit,
Position = Mouse.Hit.p,
Target = Mouse.Target
}
return Table
end
end
local Table = {
Hit = nil,
Position = Vector3.new(0,0,0),
Target = nil
}
return Table
end
This is the Error:
Argument 1 missing or nil,
I just assume that its the CientInvoke going wrong for some reason.

8 comments
"Player" is not defined.
what do you mean by that?
You never defined it, anywhere.
ive managed to fix it
for some reason getting the player from the remote event from the client fixed it, rather than defining the player from the serverscript using
GetCharacterFromPlayer()i use ContextActionService to make a gear, thats when i used a remote function to pass the player variable into the ClientInvoke
i use ContextActionService to make a gear, thats when i used a remote function to pass the player variable into the ClientInvoke