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

attempt to index nil with 'CFrame'?

Asked by 3 years ago
Edited 3 years ago
function fire()
    local hu=sp.Parent:FindFirstChild("Humanoid")
    local he=sp.Parent:FindFirstChild("Head")
    local t=sp.Parent:FindFirstChild("Torso")
    local team=sp.Parent:FindFirstChild("TEAM")
    if handlestofire == 1 then handlestofire = 2 elseif handlestofire == 2 then handlestofire = 1 end
    if hu and team and hu.Health>0 and t and he and equipped then

        if anim2 and not fireanimloop then anim2:Play() anim2:AdjustSpeed(5) fireanimloop = true end
        fireanimdelay = 0.5
        local startpos=he.Position
        local fakestartpos=(handles[handlestofire].CFrame*CFrame.new(barreloffset)).p
        local vec=(sp.Parent.Target.Value.Position-startpos).unit + (Vector3.new(math.random(-1000,1000),math.random(-1000,1000),math.random(-1000,1000)) / (1500*30))
0
Please use code bock for your first script. Bankrovers 226 — 3y
0
Block** Bankrovers 226 — 3y
0
you're trying to index CFrame on something that doesnt have the property CFrame AntoninFearless 622 — 3y
0
i will do that bincoborobloxpro 5 — 3y

Answer this question