Ok, I am doing a project for a coding class I do which we are learning how to script roblox. I am making a racing game for my project. I want to make it so when the finish part is touched by a red car, a message will say "Red Player has won!" or if it's blue: "Blue Player has won!"
This is what I have so far:
if workspace.EndLine.Touched then local message = Instance.new("Message") message.text = "A Player has won!" wait(4) message:Destroy() end
Thank you sweet peeps. - RGames1234 (happy spooptober)
chief called and said this is it
workspace.EndLine.Touched:connect(function(hit) local touchedpart = hit.Parent if touchedpart:IsA("BasePart") then -- rest of code