#Need help with noclip aka fly tool
14 messages · Page 1 of 1 (latest)
local UserInputService = game:GetService("UserInputService")
local tool = script.Parent
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local equipped = false
local speed = 1.5
function getNextMovement()
local nextMove = Vector3.new(0,0,0)
if UserInputService:IsKeyDown("W") then
nextMove = nextMove + Vector3.new(0,0,-1)
end
if UserInputService:IsKeyDown("S") then
nextMove = nextMove + Vector3.new(0,0,1)
end
if UserInputService:IsKeyDown("A") then
nextMove = nextMove + Vector3.new(-1,0,0)
end
if UserInputService:IsKeyDown("D") then
nextMove = nextMove + Vector3.new(1,0,0)
end
if UserInputService:IsKeyDown("Space") then
nextMove = nextMove + Vector3.new(0,1,0)
elseif UserInputService:IsKeyDown("LeftControl") then
nextMove = nextMove + Vector3.new(0,-1,0)
end
return CFrame.new(nextMove*Speed)
end
tool.Equipped:Connect(function()
equipped = true
local rootpart = player.Character.HumanoidRootPart
local humanoid = player.Character.Humanoid
humanoid.PlatformStand = true
rootpart.anchored = true
while equipped do
wait()
local look = (camera.Focus.Position - camera.CFrame.Position).Unit
local rootpos = rootpart.Position
local nextMove = getNextMovement()
rootpart.CFrame = CFrame.new(rootpos,rootpos+look) * nextMove
end
humanoid.PlatFormStand = false
rootpart.Anchored = false
end)
tool.Unequipped:Connect(function()
equipped = false
end)```
THANK YOUU
idk
i was eating when u said that
to send in code format
just do
three of ` on start and end
i think its called
tilda
anyways it doesnt
maybe its because u send it in non code format making the ** turn into italic
so kindly resend it
Still need help ;-;