Help, I’m having issues with my script. I tried asin and rad but it failed to work smoothly. The snippet im having issues with below. If anyone knows a way to fix this then please respond, I’m trying to get this fixed ASAP.
Some code i barrowed off while looking for a solution.
local delta: Vector3 = Vector3.new()
UIS.InputChanged:Connect(function(input, gp)
if not gp and input.UserInputType == Enum.UserInputType.MouseMovement then
delta = input.Delta
end
end)
Are you just trying to rotate the players head? Interesting, put this script in StartePlayerScripts and rotate the head with all 11 styles of EasingStyle used by tweens. Haha, it’s funny to watch!
local player: Player = game.Players.LocalPlayer
local character: Model = player.Character or player.CharacterAdded:Wait()
local root = character:WaitForChild("HumanoidRootPart")
local NeckOrigin = character.Head.Neck.C0.Position;
local function tweenNumberValue(t:number,es:Enum,ed:Enum,reverse:boolean)
local nv = Instance.new("NumberValue");
nv.Value = 0;
nv.Changed:Connect(function(Progress)
character.Head.Neck.C0 = CFrame.new(NeckOrigin) * CFrame.fromAxisAngle(Vector3.new(0,1,0),2*math.pi*Progress);
end)
local info = TweenInfo.new(t or 1,es,ed,0,reverse,1);
local tween = game.TweenService:Create(nv,info,{Value=1});
tween:Play();
tween.Completed:Wait();
tween:Destroy();
nv:Destroy();
info = nil;
end
wait(5);
local EnumStyles = Enum.EasingStyle:GetEnumItems();
for i=1, #EnumStyles do
tweenNumberValue(2,EnumStyles[i],Enum.EasingDirection.In,true);
end