Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do i make this scrip work?


script.Parent.Touched:connect(function(hit)



    if hit.Parent:FindFirstChild("Humanoid") 

Drop - game.Workspace.Part

Drop.Anchored = True



Im trying to make a drop anchor when touched please help me out guys

1 comment

0

I think you mean "Drop = game.Workspace.Part" at line 7. Also, add the 'ends' like Perci1 said.

2 answers

Hmm, try this;

if game:FindService("Workspace")and game.Workspace:FindFirstChild("Part")then --If game finds Workspace, and finds Part within Workspace then
script.Parent.Touched:connect(function(hit) --The event/function after finding
if hit.Parent:FindFirstChild("Humanoid")then --If finds Humanoid then
game.Workspace.Part.Anchored=true --Anchores Part that which is within Workspace
--Rest of coding here
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

end
end)

At the bottom.

This discussion is preserved as it was. New answers, comments, and votes are closed.