1 | script.Parent.Touched:connect( function (hit) |
2 |
3 |
4 |
5 | if hit.Parent:FindFirstChild( "Humanoid" ) |
6 |
7 | Drop - game.Workspace.Part |
8 |
9 | Drop.Anchored = True |
Im trying to make a drop anchor when touched please help me out guys
Hmm, try this;
1 | if game:FindService( "Workspace" ) and game.Workspace:FindFirstChild( "Part" ) then --If game finds Workspace, and finds Part within Workspace then |
2 | script.Parent.Touched:connect( function (hit) --The event/function after finding |
3 | if hit.Parent:FindFirstChild( "Humanoid" ) then --If finds Humanoid then |
4 | game.Workspace.Part.Anchored = true --Anchores Part that which is within Workspace |
5 | --Rest of coding here |
6 | end end ) end --All the ends |
I hope this helped!
You have two problems: First, you put Drop - game.Workspace.Part
instead of Drop = game.Workspace.Part
.
Second, you forgot the ends. Add
1 | end |
2 | end ) |
At the bottom.