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

When someone touches a brick they get a sword? [closed]

Asked by 10 years ago

I would like to have a brick that then it is touched that person gets a sword. How?

Closed as Not Constructive by evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
1
Answered by 10 years ago

Put the sword you wish for them to get in your ReplicatedStorage. Put this script into the block you wish to give the sword to the player with:

script.Parent.Touched:connect(function(part)
p = game.Players:GetPlayerFromCharacter(part.Parent)
if p == nil then return end
a = game.ReplicatedStorage.Sword:clone()
if p.Backpack:FindFirstChild(a.Name) ~= nil then return end
a.Parent = p.Backpack
end)
0
If this helped you, please remember to upvote me, and to accept this answer. Vescatur 95 — 10y
0
Doesn't work yzeerf1313 25 — 10y
Ad
Log in to vote
-1
Answered by 10 years ago

dude theres millions of them out in the catalog... and btw, its not Tools, its Functions you mean, cos if you get something when you do something is a Function...

0
btw, if you dont know how to search then just search for 'weapon giver' kapitanovaskapandr 0 — 10y
0
I don't want a giver. I just want it so when you touch the brick you get it.... yzeerf1313 25 — 10y
0
yeah, thats what they do :p you touch it you get it :p kapitanovaskapandr 0 — 10y