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

When clicked it won't give the sword, why?

function onClicked()
	local playerStarterPack=workspace.open.gear.LinkedSword
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

1 answer

✓ Accepted answer

I'll explain what each line does by commenting!

script.Parent.ClickDetector.MouseClick:connect(function(onClicked)
print(OnClick.Name)--Using the Parameter(OnClick) to get the name of the player who clicked to set off the event
local LinkedSword = game. --Please add in the location of the "LinkedSword"
	LinkedSword.Parent = game.Workspace[OnClicked.Name]--This sets the Parent of the "LinkedSword" to the Player's character.
end)

If you want anymore information about Parameter or anythings I wrote down,please feel free to post any question below.

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