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

attempt to index nil with 'Character'??

Asked by
Il_5x5 10
4 years ago
Edited 4 years ago

~~~~~~~~~~~~~~~~~

local Wheel1 = script.Parent.Wheels.FL
local wheel2 = script.Parent.Wheels.FR
local Wheel3 = script.Parent.Wheels.RL
local Wheel4 = script.Parent.Wheels.RR
local rep = game.ReplicatedStorage
local Vel = Wheel1.Velocity
local Vel2 = wheel2.Velocity
local Vel3 = Wheel3.Velocity
local Vel4 = Wheel4.Velocity

rep.V.OnServerEvent:Connect(function()
    local SpeedPerStud = 1
    Vel = 16
    local character1 = game.Players.LocalPlayer.Character -- right here
    local LastPosition = character1.HumanoidRootPart.Position
    local DistanceFromLastPosition = (character1.HumanoidRootPart.Position-LastPosition).magnitude
    Vel = Vel+(DistanceFromLastPosition+SpeedPerStud)
    local LastPosition = character1.HumanoidRootPart.Position
end)

0
In the function may be (function(player) maybe)) And local character1 = player.Character lolenko 17 — 4y
0
THANK YOU! i have very smol brain Il_5x5 10 — 4y

Answer this question