I forgot to post the video. (The reason why I’m blurring my game name so you wont get my idea by stealing it because I have a extremely good concept and I don’t want it to get stolen)
If you mean the jittering, it’s possible it’s in a server script. You could swap it to a LocalScript for the movements to be smoother for the player.
If it’s the moving around, then I’m really unsure with the really small code snippet.
Heres my code for reference (inside of a localscript):
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
local Root = Humanoid.RootPart
local TargetPart = workspace:WaitForChild("Object")
RunService.Heartbeat:Connect(function()
Root.CFrame = CFrame.new(Root.Position, Vector3.new(TargetPart.Position.X, Root.Position.Y, TargetPart.Position.Z))
end)
Yeah, this should be the cause of the jittering, since the server can’t really send information to you at the same rate that your client would be able to CFrame that in a LocalScript.
local character = player.Character or player.CharacterAdded:Wait()
local Humanoid = character:FindFirstChildOfClass("Humanoid")
local Root = Humanoid.RootPart
local TargetPart = DoorInteract
task.spawn(function()
repeat
game["Run Service"].Heartbeat:Connect(function()
Root.CFrame = CFrame.new(Root.Position, Vector3.new(TargetPart.Position.X, Root.Position.Y, TargetPart.Position.Z))
end)
until player.Knocking.Value == false
end)