This time i want to get a position.
this is the script:
local weapon = script.Parent
local enabled = true
local dazed = game.ServerStorage.KatanaDiversity.Dazed2
local rdazed = game.ServerStorage.KatanaDiversity.RevertedDazed
local Char = weapon.Parent.Parent
local RootPart = Char.HumanoidRootPart
local IL = {}
for _,V in pairs(Char:GetDescendants())do
table.insert(IL, V)
end
print("Check1")
local RAY = Ray.new(RootPart.Position, RootPart.CFrame.LookVector * 100)
local RayPos,HitPos = workspace:FindPartOnRayWithIgnoreList(RAY, IL, false, true)
print("Check2")
local Hits = {}
for index,Items in ipairs(Hits) do
if not Items then
print("no items")
end
HIt = Items
print(Items)
end
local part = Instance.new("Part")
part.Anchored = true
if HIt then
magnitude = (RootPart.Position - HIt.Position).Magnitude
else
magnitude = 100
end
part.Size = Vector3(1,1, magnitude)
please Help me.
the problem is Workspace.training.C Dummy.Katana.KatanaHitbox.DamageStrikeLdRu:33: attempt to call a table value
(that’s the last row from the script)
in my case magnitude is the length of the part and when i put it in vector 3 it says that it’s a table value
Thanks,
Tem
