Whenever I add a teleport script to the moving spotlight (as shown in the video below), which canCollide is set as false, it just doesn’t work. What script can I use for it to teleport the player to a certain position when the yellow part attatched to the NPC is touched?
local part = workspace.MyPart -- Change this to your part
local human = hit.Parent:FindFirstChild("Humanoid")
if (human~=nil) then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.Character.HumanoidRootPart.CFrame = CFrame.new(part.Position)