I have a script which i can only get to work in a local script (which is ok) in the starter pack(which makes it global) but i want the script its self to be in a block with a range on it.
function teleport()
local char = game:GetService("Players").LocalPlayer.Character
char.HumanoidRootPart.CFrame = CFrame.new(-185.8, 357.3, -569.6)
end
game:GetService("ContextActionService"):BindAction(
"Teleport",
teleport,
false,
Enum.KeyCode.E
)
dose any one know anything i need to add or change on this script
THX :D

3 comments
I assume you want the block to teleport the player to the specified coords if you press E and are in a certain range of the part?
You didn't really specify what the purpose of the part is and what the "range" does..
yes thats what i meant