Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My marathon script help?

Asked by 10 years ago

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

Log in to vote
2
Answered by
HexC3D 830 Moderation Voter
10 years ago



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.

Ad

Answer this question