I keep getting an error saying that HumanoidRootPart is not a member of Model. I believe I have
initialized everything correctly, so I am not sure why I am getting this error.
local player = game:GetService("Players").LocalPlayer
local tweenService = game:GetService("TweenService")
local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
local hammer = script.Parent
local r = Random.new()
local character
if not player.character then
print("waiting for character")
player.CharacterAdded:wait()
character = player.Character
else
character = player.Character
end
local light1 = workspace.Light1
local light2 = workspace.Light2
local light3 = workspace.Light3
local start1 = {Position = light1.Position}
local end1 = {Position = character.HumanoidRootPart.Position - Vector3.new(0, 0, r:NextInteger(5,10))} -- This is where the error is being thrown