Right now I’m trying to make a flying spherical character, but when i equip tools they work not how i expected.
To prevent tools from falling to the void in server script
do --Tool fix
mouse.Button1Down:Connect(function()
local tool = char:FindFirstChildOfClass("Tool")
if tool then
tool:Activate()
end
end)
mouse.Button1Up:Connect(function()
local tool = char:FindFirstChildOfClass("Tool")
if tool then
tool:Deactivate()
end
end)
end
In server script:
char.ChildAdded:Connect(function(tool)
if tool:IsA("Tool") then
if tool:FindFirstChild("Handle") then
local weldp = p:FindFirstChild("Weld"):Destroy()
local weld = Instance.new("Weld")
weld.Part0 = p.Head
weld.Part1 = tool:FindFirstChild("Handle")
weld.Parent = char
weld.C1 = CFrame.new(1.5, 0, 0)
end
end
end)