Well every time I use this code for my game is says CFrame cannot be assigned to
heres the code:
function f(hit) hit.Parent:WaitForChild("Humanoid") hit.Position.CFrame=CFrame.new(-2763.989, -34.075, 95.13) end script.Parent.Touched:Connect(f)
Help me!
The CFrame
is not part of the Position
. Simply set hit.CFrame
instead of hit.Position.CFrame
. Try this code, I have altered it to fix the problem:
function f(hit) hit.Parent:WaitForChild("Humanoid") hit.CFrame = CFrame.new(-2763.989, -34.075, 95.13) end script.Parent.Touched:Connect(f)
Leave an upvote and accept the answer if I helped! :)