I currently have this script

currentowner = script.Parent.Parent.CurrentOwner
teleportposition = script.Parent.Parent:FindFirstChild("teleport").CFrame
script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		if hit.Parent.Name == currentowner.Value or hit.Parent.Parent.Name == currentowner.Value  then
			print("im logic")
			--hit.Parent.HumanoidRootPart.CFrame = teleportposition
			--if hit.Parent.HumanoidRootPart.CFrame.lookVector >= CFrame.new(0,0,0) then
			--	hit.Parent.HumanoidRootPart.CFrame = teleportposition
			--end
			print(hit.Parent.HumanoidRootPart.CFrame.lookVector)
		end		
	end
end)
-- Errors
11:34:39.321 - Workspace.house.door.entryscript:7: attempt to compare two userdata values

https://gyazo.com/f477fb43908be6bae3f75dc176b477bc Here is a GIF from testing it. Help would me very much appreciated :).

2 comments

0

I'm pretty sure all you have to do is add an body velocity and maybe a body gyro. Test them out. Because usually you use lookVector for velocity's and gyros and stuff like that.

0

I want a door that just stays the same like an anchored part. It's intend is for a tycoon. Thanks for your help though i appreciate it :)