hello and tried to make that when you click when you have the object in your hand you get no gravity but this code does not work does anyone know a better solution?
local Players = game:GetService(“Players”)
local localPlayer = Players.LocalPlayer
local backpack = localPlayer:WaitForChild(“Backpack”)
tool.Equipped:Connect(function(mouse)
mouse.Button1Down:Connect(function()
if mouse.Target and mouse.Target.Parent then
mouse.Target.Gravity = .9
wait(7)
mouse.Target.Gravity = 8
end
end)
end)
local Players = game:GetService(“Players”)
local localPlayer = Players.LocalPlayer
local backpack = localPlayer:WaitForChild(“Backpack”)
local tool = Instance.new(“Tool”)
tool.RequiresHandle = false
tool.CanBeDropped = false
tool.Parent = backpack
local mouse = localPlayer:GetMouse()
tool.Activated:Connect(function()
if mouse.Target and mouse.Target.Parent then
mouse.Target.Gravity = .9
wait(7)
mouse.Target.Gravity = 8
end
end)
and please, use grammar because I don’t know what are you trying to say.