Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is there a way to force shift-lock a person?

Asked by 5 years ago

Help me! I want to make a shift lock button so that mobile players can shift lock the same way as desktop users do!

This is the closest as I can get to replicating the shift-lock but I want to be able to use the ShiftLockController Module (located at PlayerScripts.CameraScript) that ROBLOX uses but I seem to have problems reading it and understanding how it works... Can someone guide me?


local plr = game:GetService('Players').LocalPlayer local char = plr.Character or plr.CharacterAdded:Wait() local hrp = char:WaitForChild('HumanoidRootPart') local camera = game.Workspace.CurrentCamera local vector = Vector3.new(1,0,1) local cframeNew = CFrame.new game:GetService('RunService').Heartbeat:connect(function() local pos = hrp.Position hrp.CFrame = cframeNew( pos, pos + camera.CFrame.LookVector * vector) end)
0
connect is deprecated, use Connect User#19524 175 — 5y

Answer this question