Hello,
Could someone please help me figure out this problem? It works perfectly if they dont enable shiftlock, but when they do, it breaks.
local signprox = game.ReplicatedStorage:WaitForChild('Remotes'):WaitForChild('Levels'):WaitForChild('SignProx')
local player = game.Players.LocalPlayer
local originalCFrame
local originalSignCFrame
local thesign
local UIS = game:GetService("UserInputService")
signprox.OnClientEvent:Connect(function(sign)
local prox = sign.Text:FindFirstChild("Read")
if prox then
if sign:FindFirstChild("cam") then
prox.Enabled = false
thesign = sign
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local camera = game.Workspace.CurrentCamera
originalCFrame = camera.CFrame
humanoid.WalkSpeed = 0
humanoid.JumpHeight = 0
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = sign.cam.CFrame
originalSignCFrame = sign.Text.CFrame
player.PlayerGui:WaitForChild("ReadClose").close.Visible = true
else
prox.ActionText = "A bug occurred, please make a report."
wait(3)
prox.ActionText = "Read"
end
end
end)
player.PlayerGui:WaitForChild("ReadClose").close.MouseButton1Click:Connect(function()
player.PlayerGui:WaitForChild("ReadClose").close.Visible = false
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
humanoid.WalkSpeed = 16
humanoid.JumpHeight = 7.2
local camera = game.Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Custom
camera.CameraSubject = character:WaitForChild("Humanoid")
camera.CFrame = originalCFrame
if originalSignCFrame then
thesign.Text.CFrame = originalSignCFrame
end
thesign.Text.Read.Enabled = true
end)
SignProx gets fired by the server in another script
When a mobile player enables shiftlock, their camera starts going to the left for an inexplicable reason.
Any help is appreciated, thank you .