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

How can you detect a player with a script?

I'm trying to use RocketPropulsion to create a part that follows the player around, but I don't know how to detect the player. Can someone help with this?

1 comment

0

if you have their character you could use game.Players:GetPlayerFromCharacter(Character)

1 answer

function is_player(entity)
	return typeof(entity) == "Instance" and entity.ClassName == "Player"
end

1 comment

0

Currently I'm having to white list players in order for the script to work and this might work, but is there a way to use something like LocalPlayer but on a script instead? I've looked it up everywhere but can't find it. For example, like RocketPropulsion.Target = Player?

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