Hello!
I making game named “Mess Simulator” where you doing mess but I trying to script to throw cumpled paper but when I click the paper will go only 3 studs stop and he will be gone and when I checked the handle in workspace it was anchored unless there is is’nt any weld and in script I’m setting to false
Script in server:
game.ReplicatedStorage.ThrowMess.OnServerEvent:Connect(function(plr,tool,MousePointing)
if tool.Debaunce.Value == false then
local Velocity = Instance.new("BodyVelocity")
Velocity.Name = "ToolSpeed"
local Clone = tool.Handle:Clone()
Clone.Parent = workspace
tool.Handle.Transparency = 1
Velocity.Parent = Clone
Velocity.Velocity = MousePointing*30
Clone.Anchored = false
if Clone.Anchored == true then
Clone.Anchored = false
end
wait(0.5)
Velocity:Destroy()
end
end)
Try inspecting in explorer whether any of the parts are anchored. If none of them are, you can use basepart:IsGrounded() to check whether the part is essentially anchored. Try also checking whether the BodyVelocity has any velocity to begin with. It is also better to just use basepart.Velocity.
You can use Clone:GetPropertyChangedSignal(“Anchored”) to unanchor the handle as soon as it is anchored.
Some scripts use Debris to remove a part. In this case it is completely optional but you can use it if you like.
For security, you should try to make sure that the tool belongs the the player, otherwise another player’s tool could be used to throw the trash.
Unfortunately no, I don’t think it is because of this. There is reparenting of the tool and even if there was, it happens on the server.
Does the same thing happen w/ no BodyVelocity? (Just tweaking the pos a little.)
Edit:
I’d also suggest .CanCollide = true
Edit2:
You mention: “I checked the handle in workspace it was anchored unless there is is’nt any weld”
Are you saying you have a weld on the Handle??
Have you tried BreakJoints() on it?