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

I cant put target for RocketPropulsion?

Here is the script , note:The script Parent Is RocketPropusion and RocketPropusion's Parent is Part.

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(chr)
		local parts = chr:GetChildren()
		for i,v in pairs(parts) do
			if v.Name == "UpperTorso" then
			print (v)
			print (i)
			script.Parent.Target = v
			end
		end
	end)
end)

2 comments

0

instead of doing that, you could just do script.Parent.Target = Character.UpperTorso

0

But why mine isn't working?Is it a bug or scripting mistake?

1 answer

Target must be 'UpperTorso' (without ''), and it's not enough to set the target, you need to start it:

...
script.Parent.Target = v
script.Parent:Fire()

2 comments

0

the change from quotation marks to apostrophes isn't necessary at all

0

I don't want to fire it now I want to set the Target.

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