it worked when i first tested it, but broke somehow, tried it in a blank game to see if another script was affecting it and it still refused to work lol. im pretty new to scripting, but heres the basic rundown of what im trying to accomplish here. my game has a function where the player can click and drag anything unachored kinda like gmod, and when they pick up a certain part and place it on/touch another part with it, i want them to teleport to a position/part, whichever i can get to work. i think i just am trying to do something not possible with the format i use/way im approaching it or something. there is nothing in the error log.

this is the script i have in the block that is being touched by the part i want to initiate the teleport.

script.Parent.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("rooster")then

		local Player = game:GetService("Players").LocalPlayer
		local Humanoid = game.Workspace:FindFirstChild("HumanoidRootPart")
		
		print("teleporting")

		game.Workspace:WaitForChild("Player.Name",3)Humanoid = CFrame.new(game.Workspace.point1.Position)
			
		
	end
end)

1 comment

0

the game is singleplayer as well, so if i cant find the player who was behind it, teleporting the nearest player would also be effective but im not quite sure how id integrate that into this