Hi there, I’m working on trying to get a workspace-sided script to work that basically shrinks the player down upon joining and slowly grows them up to bigger sizes infinitely. However, every time they do get shrunk their camera cannot attach to the player head as usual and it kind of ruins the effect of being shrunk down to a small size which is what I’m trying to fix. I’ve tried changing the camera FOV for the player via game.Workspace.Camera but it doesn’t seem to work.
Code in question:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local cam = game.Workspace.Camera
local noid = char:FindFirstChild("Humanoid")
if noid ~= nil then
wait(0.1)
local HS = noid.HeadScale
local BDS = noid.BodyDepthScale
local BWS = noid.BodyWidthScale
local BHS = noid.BodyHeightScale
print("Initial Camera FOV: "..cam.FieldOfView)
HS.Value = HS.Value * 0.1
BDS.Value = BDS.Value * 0.1
BWS.Value = BWS.Value * 0.1
BHS.Value = BHS.Value * 0.1
noid.WalkSpeed = noid.WalkSpeed * 0.1
cam.FieldOfView = cam.FieldOfView * 0.1
while noid ~= nil do
wait(1)
HS.Value = HS.Value * 1.01
BDS.Value = BDS.Value * 1.01
BWS.Value = BWS.Value * 1.01
BHS.Value = BHS.Value * 1.01
noid.WalkSpeed = noid.WalkSpeed * 1.01
print("Walkspeed: "..noid.WalkSpeed)
end
end
end)
end)
Any help would be appreciated.