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

My marathon script help?

So this is a script for my Marathon game.

End = game.Workspace.End
msg = game.Workspace.Message
text = msg.Text

function onTouched(playerwhoTouched)
	game.Workspace.playerwhoTouched:GetPlayers("Torso")
	if playerwhoTouched.Torso:onTouched(End) then
		msg.text = ...playerwhoTouched "Won!!!, congrats!"
	end"
end

script.Parent.Touched:connect(onTouched)

It's suppose to be the player who touched the end with they're torso, a message pops up. It's like ...Roboy5857 "Won!!!!, congrats!" but it doesn't work. Why?

1 answer

✓ Accepted answer



script.Parent.Touched:connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
z = Instance.new("Message")
z.Text = player.Name.."Has Won!"

end)
end)


This script should be in the End Part so it can work.

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