I basically want to make it like once a player touches a brick, they float around like they're in space with 0 gravity. How do I do this?
im not really the best scripter but heres what i got
01 | cantouch = true |
02 | -- notes: not no grav cuz yeah but its close, put script in part |
03 | -- made by karbis (pls dont remove k ty) |
04 | function touched(hit) |
05 | if hit.Parent:FindFirstChild( "Humanoid" ) then |
06 | if cantouch then |
07 | cantouch = false |
08 | local bodyforce = Instance.new( "BodyForce" , hit.Parent.HumanoidRootPart) |
09 | bodyforce.Force = Vector 3. new( 0 , 2000 , 0 ) |
10 | wait( 1 ) |
11 | cantouch = true |
12 | end |
13 | end |
14 | end |
15 |
16 | script.Parent.Touched:Connect(touched) |