(SOLVED)
Misspelled CFrame as CFaame! Don’t worry, happens to all of us!
1 Like
You had a typo right here! make it smth like this
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local hum = char:WaitForChild("Humanoid")
local humrp = char:WaitForChild("HumanoidRootPart")
local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(input,is)
if is then return end
if input.KeyCode == Enum.KeyCode.E then
local health = hum.Health
local lastCF = humrp.CFrame
task.wait(3)
hum.Health = health
char:SetPrimaryPartCFrame(lastCF)
end
end)
EDIT: If this helped you please mark this as solution.
1 Like
Cframe in itself is a table, you have to use CFrame.new
1 Like
Bare in mind, declaring a variable named “CFrame” while override Roblox’s default reference to the CFrame class.
Thus any subsequent calls to the CFrame class’s functions will result in an error, attempt to call a nil value.
1 Like