Unanchored local part teleporting issue?

Hi, I’ve got a bit of a unique issue.

I have a custom controller called wallstick and I’m using it on the player in maps that are local to the client.

I’m finding that under this specific context unanchored parts are moved for no apparent reason when my player gets close to them.

Bug.rbxl (60.4 KB)

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local World = ReplicatedStorage:WaitForChild("World")
World.Parent = workspace

if true then -- toggle to switch between the custom controller and a regular humanoid
	local WallstickClass = require(ReplicatedStorage:WaitForChild("Wallstick"))
	local Wallstick = WallstickClass.new(Players.LocalPlayer)
	Wallstick:Set(World.Spawn, Vector3.new(0, 1, 0), World.Spawn.CFrame)
else
	script.Parent.HumanoidRootPart.CFrame = World.Spawn.CFrame
end

Under the same circumstances w/ a regular humanoid this bug does not occur.

When the map is not local to the client and I use wallstick this issue is non-existant:

I’ve tried a number of solutions, but none seem to work:

  • Force the part not to sleep
  • I’ve verified that the camera’s focus is correct
  • I’ve toggled between platform stand and physics for the character’s humanoid
  • I’ve tried making sure collision groups are all default

Does anybody know what could be causing this and/or what steps I could take to combat it?

Thanks!

1 Like

Interesting thing, Box moves only in one Specefic direction.
Like CFrame.LookVector

1 Like

I FIGURED IT OUT!!!

So the reason this is happening is a problem w/ my code.

A physics part is copied when the player gets near and should be cframed far away from anywhere it could cause problems.

However! It was not cframed on the frame it was created, instead it was cframed the next frame after. This totally makes sense, now, but what doesn’t make sense is why this wasn’t happening when the map wasn’t local?

Well regardless, it’s figured out now!

4 Likes