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

.Touched question for a Ball game?

I am really confused, My plan is to make it when you score the ball you get a point on the scoreboard, Im confused on how to approach this, would I add a part? I'm not a very good scripter so I need all the help I can get, Thank you.

2 comments

0

Giving more detail on what you actually want would help, this is very vague.

0

Please elaborate and try to compile a code of your own so we can help you and not straight out complete it for you.

1 answer

Try to add a (string) value to the ball, name it Toucher, then add a normal (not local) script to the ball

local ball = workspace.Ball -- You should change this to whatever is in your game

ball.Touched:Connect(function(hit)
	local Hum = hit.Parent:FindFirstChild("Humanoid")
	if Hum then
		ball.Toucher.Value = hit.Parent.Name
	end
end)

That's it. Now you can make the scroreboard write the ball.Toucher.Value

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