Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

is it the contextactionservice or lookvector? help

Asked by 4 years ago

i don't have strong understanding of the lookvector but i have a higher understanding of cas(contextactionservice)

local repl = game:GetService("ReplicatedStorage")
local gunf = repl:WaitForChild("Gun")
local PG = gunf:WaitForChild("PG")
local armf = repl:WaitForChild("Arm")
local armg = armf:WaitForChild("Arms")
local player = game:GetService("Players")
local runservice = game:GetService("RunService")
local cc = workspace.CurrentCamera
local gun = PG
local cas = game:GetService("ContextActionService")
local debris = game:GetService("Debris")
if repl and gunf and PG and armf and armg and player and runservice then
    ---script run
    --arm
    armg.Parent = workspace.Camera
PG.Parent = armg.Parent
    runservice.Heartbeat:connect(function(T)
armg:SetPrimaryPartCFrame(cc.CFrame) 
PG:SetPrimaryPartCFrame(armg.r.CFrame)
end)
function s(shoot,inputs,inputo)
    if inputs == Enum.UserInputState.Begin then
        local b = Instance.new("Part",PG.Base)
        b.Position = PG.Base.Position
        b.Velocity = b.CFrame.lookvector * 200
        print("shoot")
    end
cas:BindAction("shoot",s,false,Enum.UserInputType.MouseButton1) 
end

end
0
Console output or a description of the issue would go a great deal in helping us help you. Jahaziel_VanDerHas 238 — 4y

1 answer

Log in to vote
0
Answered by
Farsalis 369 Moderation Voter
4 years ago

Grammatical Error, CFrame accepts, LookVector, and lookVector.

Hope That Helped.

Ad

Answer this question