So, I have a ViewportFrame. I use a custom function, creating a clone of your character, then put it inside of the ViewportFrame.
The Cloning Character Script (LocalScript)
local function getFakeCharacter()
character.Archivable = true
local fake = character:Clone()
character.Archivable = false
return fake
end
local fakeChar = getFakeCharacter()
local newCam = Instance.new("Camera", workspace)
--blah blah blah (parenting fakeChar to Viewport and point newCam towards player, then setting Viewport.CurrentCamera to newCam)
After doing this, my custom sprint script inside of the original character breaks for some reason. (uses ContextActionService to make your WalkSpeed faster)
The Sprint Script (LocalScript)
local function sprint(_, inputState)
if inputState == Enum.UserInputState.Begin then
isSprinting = true
humanoid.WalkSpeed = 30
elseif inputState == Enum.UserInputState.End then
isSprinting = false
humanoid.WalkSpeed = game:GetService("StarterPlayer").CharacterWalkSpeed
end
end
Why this happens, I don’t know why. Any pointers would help.