-- example code
local Player = game:GetService('Players').LocalPlayer
local Character = Player.Character
local Debounce = os.clock()
local Tool = script.Parent
local function Activate()
if os.clock() > Debounce + 1 then Debounce = os.clock()
local Part = script.Parent.Handle:Clone()
Part.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -5)
-- CFrame is the origin position of an instance
-- we referenced the parts origin position to be inside our humanoidrootparts origin
-- the part will then appear inside our torso
-- lets say we want it to move it 5 studs in front of the humanoidrootpart
-- we times * the current parts cframe position, with a new cframe.new() position
-- it will now be in front of the player by 5 studs
-- thats pretty much cframe
Part.Parent = workspace
end
end
Tool.Activated:Connect(Activate)```
#Me no understand CFrame
15 messages · Page 1 of 1 (latest)
** You are now Level 1! **
Where did he ask you to add a denounce lol
can u let me finish
Lol be my guest
@tulip sand just know that the front of any object is the object's CFrame multiplied by a CFrame (or vector) with a negative Z coordinate
Whos
so I tried the stuff and nothing changed, heres the full script, don't mind the animation, once again its in a local script.
why
?
** You are now Level 2! **