Hello there I want to make a soccer ball, those can save the kicker's info to String Values. I've coded this script, let me show you.

-- Following Scripts are inserted in the Ball Part
-- Surely, Possess is a String Value.
local possessPlayer = script.Parent.Configuration.Possess.Value

script.Parent.TouchEnded:connect(function(hit)
	if hit.Parent:FindFirstChild('Humanoid') ~= nil then
		possessPlayer = hit.Parent.Character
		-- hit.Parent.player.Name
		-- hit.Parent.player.Character
		-- game.Player.Character
		--  etc... all failed. :(
		-- Well I've just indicate the player-character name correctly.
		--It works. However, It can't be applied for all players.
		print(possessPlayer)
		wait(1)
	end
end)

Can somebody help me?

2 comments

0

Is the kicker a leaderstas value?

0

yeah, kicker is the member of the leaderstas