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

How do i make this scrip work?

Asked by
DSAHS 0
10 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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

0
I think you mean "Drop = game.Workspace.Part" at line 7. Also, add the 'ends' like Perci1 said. emite1000 335 — 10y

2 answers

Log in to vote
0
Answered by 10 years ago

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!

Ad
Log in to vote
0
Answered by
Perci1 4988 Trusted Moderation Voter Community Moderator
10 years ago

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.

Answer this question