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?
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.