https://gyazo.com/38791b50757ea6b7f482f279aeb74bc9
This is the video of what’s happening^
My server script:
local count = 0
local pastanim;
local canbehit = false
debounce = true
local slices = game.ServerStorage:WaitForChild("Slices")
script.Parent.Equipped:Connect(function()
equipped = true
end)
script.Parent.Unequipped:Connect(function()
equipped = false
end)
script.Parent.Activated:Connect(function()
print("activated")
if equipped and debounce then
print("Got here")
local randomness = math.random(1,2)
if randomness == 1 then
local slice = slices.Slice:Clone()
local inversed = script.Parent.Parent.HumanoidRootPart.CFrame
slice.Parent = workspace
slice:SetPrimaryPartCFrame(script.Parent.Parent.HumanoidRootPart.CFrame)
local velocity = Instance.new("BodyVelocity")
velocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
velocity.Velocity = inversed.LookVector * 70
velocity.Parent = slice.PrimaryPart
end
local Humanoid = script.Parent.Parent.Humanoid
local ActiveTracks = Humanoid:GetPlayingAnimationTracks()
for _,v in pairs(ActiveTracks) do
if v.Name == "Ignite" then
v:Stop()
end
end
function pick()
if pastanim == nil then
local anims = script.Parent.Slices:GetChildren()
count += 1
if count > #anims then
count = 1
end
print(count)
local loader = anims[count]
pastanim = loader
local anim = Humanoid:LoadAnimation(loader)
anim:Play()
script.Parent.Handle.SwordSlash:Play()
debounce = false
canbehit = true
anim.Stopped:Wait()
canbehit = false
debounce = true
else
local anims = script.Parent.Slices:GetChildren()
local loader = anims[math.random(1, #anims)]
if loader ~= pastanim then
count += 1
if count > #anims then
count = 1
end
loader = anims[count]
print(count)
local anim = Humanoid:LoadAnimation(loader)
pastanim = loader
anim:Play()
script.Parent.Handle.SwordSlash:Play()
debounce = false
canbehit = true
anim.Stopped:Wait()
canbehit = false
debounce = true
else
pick()
end
end
end
pick()
end
end)
script.Parent.Handle.Touched:Connect(function(hit)
if canbehit == true then
local hum = hit.Parent:FindFirstChild("Humanoid")
if hum then
hum:TakeDamage(20)
canbehit = false
end
end
end)
The problem is with setting the CFrame of the model.
My explorer:

Any help will be appreciated, thanks!