What do you want to achieve?
For the tool to move properly
What is the issue?
The model glitches out the tool, and a part just flickers between were it used to be and the buggy place
What solutions have you tried so far?
I’ve tried using a new model entirely but it didn’t fix anything
script.Parent.Unequipped:Connect(function()
repeat
task.wait()
until script.Parent.Parent.Name == "Backpack"
local FlagTool = script.Parent.Flag.Parent
local FlagModel = FlagTool.Flag
local Player = FlagTool.Parent.Parent
FlagModel.Parent = workspace
FlagTool.Parent = game:GetService("ServerStorage").DroppedFlags
FlagModel:MoveTo(Player.Character.HumanoidRootPart.Position + Vector3.new(0,0,3))
for index, value in ipairs(FlagModel:GetDescendants()) do
if value:IsA("BasePart") then
value.CanCollide = false
value.Anchored = false
end
end
FlagModel.Detection.Touched:Wait()
for index, value in ipairs(FlagModel:GetDescendants()) do
if value:IsA("BasePart") then
value.CanCollide = true
value.Anchored = true
end
end
end)
Also yes, everything is welded and anchored / un anchored properly
for i, v in pairs(npc:GetChildren()) do
if v:IsA("BasePart") or v:IsA("MeshPart") then
v:SetNetworkOwnerShip(nil)
end
end
@AccessQ the tweening wont work due to it being a ‘moveto’ and that wont load animations or make anything better, plus calculating time can be hard for new learners
I managed to fix the original bug happening, but now moveTo is just going to random places: robloxapp-20220601-2002508.wmv (1.2 MB)
script.Parent.Unequipped:Connect(function()
local ServerStorageService = game:GetService("ServerStorage")
local FlagTool = script.Parent
local FlagModel = FlagTool.Flag
local Player = FlagTool.Parent.Parent
repeat
task.wait()
until FlagTool.Parent.Name == "Backpack"
FlagModel.Parent = workspace
FlagTool.Parent = ServerStorageService.DroppedFlags
for index, object in ipairs(FlagModel:GetDescendants()) do
if object:IsA("BasePart") then
object.Anchored = false
object.CanCollide = false
end
end
print(Player.Character.HumanoidRootPart.Position, Player.Character.Torso.Position)
FlagModel:MoveTo(Player.Character.HumanoidRootPart.Position)
end)