The output window says that "parent is not a valid member of Workspace". I am trying to make a minigame and in my Lighting (which contains the model) it has:
-Model (also named Pig), minigame, time, winner, Part, Part
while true do wait(1) script.Parent.time.Value = script.Parent.time.Value - 1 end function personWon(person) if not person.Parent then return end local player = game.Player:getPlayerFromCharacter(person.Parent) if player then script.Parent.Winner.Value = player end end script.Parent.won.Touched:connect(personWon) function loadMinigame(mg) local m = mg:clone() m.parent = Workspace return m end
On line 10, it says "game.Player:getPlayerFromCharacter(person.Parent)" "Player" should have an S at the end, like so:
game.Players:getPlayerFromCharacter(person.Parent)
The reason for this is that you are accessing the Players list, not the "Player" list.