Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-4

Part's falling on touch using Cframe?

Asked by 9 years ago

How do you make a part fall (using Cframe) on touch?

0
Please attempt the code before asking for help. Perci1 4988 — 9y
0
@Perci1 I don't know how to do it though, i'm not the best scripter iiCasual 20 — 9y
1
Use the 'Touched' event, thats all I can say. :/ TheeDeathCaster 2368 — 9y
1
Then learn to script more before you do something like this. This is not the place to get free code. Perci1 4988 — 9y

1 answer

Log in to vote
0
Answered by
iaz3 190
9 years ago

Unless you want to make a part jsut go straight down without moving in any way whatsoever except down, remainly perfectly flat, anchored, and looking really really really stupid, you don't.

If you INSIST then here is code that will use CFrame to make it "fall"

local part = script.Parent

part.Touched:connect(function()
    for i = 1, 20 do -- go 20 studs.
        part.CFrame = part.CFrame - Vector3.new(0,1,0)
        wait(0.01)
    end
end)
0
Dude, you can do it! And you can't script I bet iiCasual 20 — 9y
0
Just because you CAN do something, doesnt mean you should, or it's the smart thing to do, or you won't like a complete idiot for doing it. iaz3 190 — 9y
0
Also, you're go to response is" And you can't script i bet" when you encounter a superior? Really? I know Lua, Python, Java, and html. You don't even know Lua. iaz3 190 — 9y
Ad

Answer this question