I am testing rn, I was goofy I forgot to remove an end, this is why the whole script broke, one second trying it with rn
Okay so it does nothing at all
if weld:IsA("Weld") then
block.CanCollide = true
block.Velocity = Vector3.new(0, 0, 0)
block:WaitForChild("AngularVelocity").AngularVelocity = Vector3.new(0, 0, 0)
weld:Destroy()
wait(1)
block.Anchored = true
pickedup.Value = false
print(block.Position)
print((block.Position - plr.Character.HumanoidRootPart.Position).Magnitude)
Had to add an AngularVelocity to the meat, I think that’s intended
If that doesn’t work then what about this?
if weld:IsA("Weld") then
block.CanCollide = true
block.Anchored = true
weld:Destroy()
while true do
local raycastResult = workspace:Raycast(block.Position, Vector3.new(0, -1, 0))
if raycastResult then
break
end
block.Position = block.Position - Vector3.new(0, 0.05, 0)
task.wait()
end
wait(1)
pickedup.Value = false
print(block.Position)
print((block.Position - plr.Character.HumanoidRootPart.Position).Magnitude)
So basically we’ll be manually moving it down
To make it ignore the character, add
local hitPart = raycastResult.Instance
if hitPart:IsDescendantOf(--Character model here--) then
else
break
end
inside if raycastResult then
remove the original break though
I just came back from afk, will test now!
I think we’re gettin there!
Looks like this rn
local function ThrowBlock(plr, block)
local char = plr.Character
local paw = char:WaitForChild("Paw1")
if CanThrowBlock == true and pickedup.Value == true then
local weld = block:WaitForChild("BlockWeld")
if weld:IsA("Weld") then
block.CanCollide = true
block.Anchored = true
weld:Destroy()
while true do
local raycastResult = workspace:Raycast(block.Position, Vector3.new(0, -1, 0))
if raycastResult then
local hitPart = raycastResult.Instance
if hitPart:IsDescendantOf(plr.Character) then
else
break
end
block.Position = block.Position - Vector3.new(0, 0.05, 0)
task.wait()
end
wait(1)
pickedup.Value = false
print(block.Position)
print((block.Position - plr.Character.HumanoidRootPart.Position).Magnitude)
--if (block.Position - plr.Character.Jaw.Position).Magnitude > 10 then
--print("real I am working")
--block.Position = paw.Position
--block.CFrame = paw.CFrame
--end
pickedup.Value = false
print(block.Position)
print((block.Position - plr.Character.Paw1.Position).Magnitude)
end
end
CanThrowBlock = false
pickedup.Value = false
end
end
This is right btw? Cuz as I see it’s supposed to move the meat chunk down right, maybe check the ends in this script
Once we got this to work, you’ll definitely be in the credits as contributor
If it’s moving up then change
block.Position = block.Position - Vector3.new(0, 0.05, 0)
to
block.Position = block.Position + Vector3.new(0, 0.05, 0)
The video I send was really laggy, will use another recorder next time like the previous vids, but it’s not moving at all
why are these inside the while loop?
hm? They’re not, there’s an end, followed by wait(1) unless I messed something up
yeah no i think they’re inside the while loop
local CanThrowBlock = false
local pickedup = game.ReplicatedStorage.Picked
local function Takeblock(plr, block)
local weld = Instance.new("Weld")
local char = plr.Character
local jaw = char:WaitForChild("Jaw")
-----
local humanoid = char:WaitForChild("Humanoid")
local Carnivore = humanoid:GetAttribute("Carnivore")
local Herbivore = humanoid:GetAttribute("Herbivore")
local Omnivore = humanoid:GetAttribute("Omnivore")
if Carnivore == true or Omnivore == true and pickedup.Value == false then
block.Anchored = false
weld.Parent = block
weld.Part0 = block
weld.Part1 = jaw
block.CFrame = char.Jaw.CFrame
weld.Name = "BlockWeld"
wait(1)
CanThrowBlock = true
pickedup.Value = true
end
---------
end
local function ThrowBlock(plr, block)
local char = plr.Character
local paw = char:WaitForChild("Paw1")
if CanThrowBlock == true and pickedup.Value == true then
local weld = block:WaitForChild("BlockWeld")
if weld:IsA("Weld") then
block.CanCollide = true
block.Anchored = true
weld:Destroy()
while true do
local raycastResult = workspace:Raycast(block.Position, Vector3.new(0, -1, 0))
if raycastResult then
local hitPart = raycastResult.Instance
if hitPart:IsDescendantOf(plr.Character) then
else
break
end
block.Position = block.Position - Vector3.new(0, 0.05, 0)
task.wait()
end
--wait(1)
--if (block.Position - plr.Character.Jaw.Position).Magnitude > 10 then
--print("real I am working")
--block.Position = paw.Position
--block.CFrame = paw.CFrame
--end
--pickedup.Value = false
print(block.Position)
print((block.Position - plr.Character.Paw1.Position).Magnitude)
end
end
CanThrowBlock = false
pickedup.Value = false
end
end
game.ReplicatedStorage.TakeBlock.OnServerEvent:Connect(Takeblock)
game.ReplicatedStorage.ThrowBlock.OnServerEvent:Connect(ThrowBlock)
That’s the whole script now, doesn’t change position
move these to the other side of the “end” in front of them
you should also set this to false, and only set it to true at the “break” part of the raycasting loop (right behind the break)
local function ThrowBlock(plr, block)
local char = plr.Character
local paw = char:WaitForChild("Paw1")
if CanThrowBlock == true and pickedup.Value == true then
local weld = block:WaitForChild("BlockWeld")
if weld:IsA("Weld") then
block.CanCollide = false
block.Anchored = true
weld:Destroy()
while true do
local raycastResult = workspace:Raycast(block.Position, Vector3.new(0, -1, 0))
if raycastResult then
local hitPart = raycastResult.Instance
if hitPart:IsDescendantOf(plr.Character) then
else
block.CanCollide = true
break
end
end
block.Position = block.Position - Vector3.new(0, 0.05, 0)
task.wait()
--wait(1)
--if (block.Position - plr.Character.Jaw.Position).Magnitude > 10 then
--print("real I am working")
--block.Position = paw.Position
--block.CFrame = paw.CFrame
--end
--pickedup.Value = false
print(block.Position)
print((block.Position - plr.Character.Paw1.Position).Magnitude)
end
end
CanThrowBlock = false
pickedup.Value = false
end
end
game.ReplicatedStorage.TakeBlock.OnServerEvent:Connect(Takeblock)
game.ReplicatedStorage.ThrowBlock.OnServerEvent:Connect(ThrowBlock)
Current script, couldn’t move canCollide = true after break but before it and put
block.Position = block.Position - Vector3.new(0, 0.05, 0)
task.wait() after the end though it still doesn’t move
i wouldn’t recommend printing in the loop, also what happens if you change the movement amount to 0.1 on the y axis?
Also nothing, I don’t know honestly if the loop is working and removed the prints
I’ll see now what happens if I remove the anchored = true before the weld:Destroy() (<- falls through map)
Just to confirm, the while loop looks like this; yes?
while true do
local raycastResult = workspace:Raycast(block.Position, Vector3.new(0, -1, 0))
if raycastResult then
local hitPart = raycastResult.Instance
if hitPart:IsDescendantOf(plr.Character) then
else
block.CanCollide = true
break
end
end
block.Position = block.Position - Vector3.new(0, 0.05, 0)
task.wait()
end
It should fall slowly
last two lines were misplaced in my script, corrected and I am testplaying rn