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

Why do I keep getting "attempt to index nil with 'RenderStepped' "?

Asked by 3 years ago

So I am trying to make an FPS Framework for a game and I keep getting the same error over and over again, I have set the Primary Part of the model but I keep getting it no matter what I do, is there any sort of fix to this?

Run.RenderStepped:Connect(function()
    if WeaponInHand then 
        WeaponInHand:SetPrimaryPartCFrame(
            Camera.CFrame
                * MainCF
0
Did you use 'game:GetService("RunService")' in the 'Run' variable? Is this in a LocalScript or ServerScript (regular script) CMVProduction 25 — 3y
0
This is in a LocalScript, and about the ''game:GetService("RunService")', where do I exactly put it? Do I replace the 'Run' variable or do I add it somewhere else? Justin_GamingLTU2 -5 — 3y
0
You call the service like this: local Run = game:GetService("RunService"). After that, you shouldn't get that error message anymore. CMVProduction 25 — 3y

Answer this question