In the following script, you press a gui button and it would move your character, it doesn't seem to work so I tried multiply body parts, here are some examples.
script.Parent.MouseButton1Click:connect(function(idk) script.Parent.Parent.Parent.Parent.Character.Head.Cframe = CFrame.new(script.Parent.Parent.Parent.Parent.Character.Head.Position + 0, 100, 0) end)
script.Parent.MouseButton1Click:connect(function(idk) script.Parent.Parent.Parent.Parent.Character.UpperTorso.Cframe = CFrame.new(script.Parent.Parent.Parent.Parent.Character.UpperTorso.Cframe + 0, 100, 0) end)
and here is the script I used to test if this would somehow work in the first place
script.Parent.MouseButton1Click:connect(function(idk) script.Parent.Value.Value = script.Parent.Parent.Parent.Parent.Name print ("Hi "..script.Parent.Value.Value.."!") end)
When using CFrame
, it is case-sensitive. You put Cframe, in which it should've been CFrame.
Secondly, you're setting the head's CFrame, CFrame isn't a property of the part, it is a property used to change the part as a data value. The Position is the real thing you want to change here.
script.Parent.MouseButton1Click:connect(function(idk) -- first script script.Parent.Parent.Parent.Parent.Character.Head.Position =CFrame.new(script.Parent.Parent.Parent.Parent.Character.Head.Position + 0, 100, 0) end)
By the way, I recommend using CFrame.new(Vector3.new()) instead also but both still do the same, it's just Vector3 is a proper way of handling xyz coordinates in my opinion.
script.Parent.MouseButton1Click:connect(function(idk) -- first script again script.Parent.Parent.Parent.Parent.Character.Head.Position = CFrame.new(Vector3.new(script.Parent.Parent.Parent.Parent.Character.Head.Position + 0, 100, 0)) end)
script.Parent.MouseButton1Click:connect(function(idk) -- second script script.Parent.Parent.Parent.Parent.Character.UpperTorso.Position = CFrame.new(Vector3.new(script.Parent.Parent.Parent.Parent.Character.UpperTorso.Position + 0, 100, 0)) end)
If it doesn't work then try these other two scripts:
script.Parent.MouseButton1Click:connect(function(idk) -- first script script.Parent.Parent.Parent.Parent.Character.Head.Position = CFrame.new(Vector3.new(script.Parent.Parent.Parent.Parent.Character.Head.Position)) script.Parent.Parent.Parent.Parent.Character.UpperTorso.Position = script.Parent.Parent.Parent.Parent.Character.UpperTorso.Position + Vector3.new(0, 100, 0) end)
script.Parent.MouseButton1Click:connect(function(idk) -- second script script.Parent.Parent.Parent.Parent.Character.UpperTorso.CFrame = CFrame.new(Vector3.new(script.Parent.Parent.Parent.Parent.Character.UpperTorso.CFrame)) script.Parent.Parent.Parent.Parent.Character.UpperTorso.Position = script.Parent.Parent.Parent.Parent.Character.UpperTorso.Position + Vector3.new(0, 100, 0) end)
By the way, you don't have to fill in 'idk', instead you could leave it blank, but this isn't important, just saying.