This script I made is that when this tool touches a part, it teleports the player to another map, but when the tool does touch the part, nothing happens. I think the script needs to be inside the tool, but the problem is that I do not know how to define it, Here is the script that I have so far that is inside the tool where the player clicks on to pick the tool up (If something does not make sense comment)
local player = game.Players.localplayers local humroot = player.Character.Humandrootpart local teleport = game.Workspace.Store.teleport local db = false script.Parent.Touched:Connect(function(Key) if Key == game.Workspace.bedroom.Door then if not db then db = true humroot.CFrame = teleport.CFrame wait(1) db = false end end end)
Thanks for reading!