I wrote this script to teleport my character to a part (home) on a click of a button.
wait()
char = script.Parent.Parent.Parent.Parent.Character
script.Parent.MouseButton1Click:Connect(function()
if char.Torso ~= nil then
char.Torso.Cframe = workspace.home.CFrame
elseif char.LowerTorso ~= nil then
char.LowerTorso.CFrame = workspace.home.CFrame
end
end)
It seems like this doesn't work at all. I tried everything I know, including changing the code to change the position instead of the CFrame and changing the code to change the CFrame/position of the HumanoidRootPart.
Is there something that I'm missing here, or does this entire procedure work?

11 comments
Too many comments, makes it harder to read.
shut incaspaz ur just jealous bc he got here first
i never even planned on answering this question
yeah i bet u didnt u nerd, bc u arent even capable, hehe
changed, better now?
Should still improve the readability for the first one, by either shortening the comments or removing them
now is better?
INCAPAble is bad
gioni01 wow for someone with high rep i though you'd be more mature
" Too many comments, makes it harder to read." this statement doesn't even make any sense what are you talking about
I thought this wasn't working. but i figured out that the script needed to be local. A genuine thanks for for the help!