I have been experimenting with scripting recently and as of now, I want to make the player’s character launch into the air using CFrame. The solution is probably very simple but I haven’t been able to find videos or articles on using CFrame on a player’s character yet. Feedback on more effect ways to launch the character into the air would also be helpful, thanks!
Well, You can either Use Player.Character:SetPrimaryPartCFrame(CFrame)
or Player.Character:TranslateBy(offset)
An example of the latter would be:
for i = 1,30 do
player.Character:TranslateBy(Vector3.new(0,1,0))
wait()
end
I heard it was better to use CFrame over Vecter3, is this true?
well, it depends on the function you’re using, generally, its better to use CFrame than to use Vector3, for example, if you were moving objects, it would be better to use CFrame if you dont want it to be disrupted by obstructed objects.
However, TranslateBy isnt affected by collision, so it isnt really necessary to use SetPrimaryPartCFrame
Edit: By “isnt affected by collision” I mean that it doesnt move up in the Y direction until there arent any obstructions
Ah, okay. I also tried out your second suggestion and it worked pretty well. Thanks for the advice.