I'm making a place in roblox. And i wrote script, Look at it, and please, say what wrong with it??? In another scripts all works perfectly!, you can help me with it?
local players = game.Players:GetChildren()
local pupil = players[math.random(0,#players)]
local James = game.Workspace.James
local Texte = game.StarterGui.ScreenGui.Maintexzt
local nameq = game.StarterGui.ScreenGui.Maintexzt.Nameq
function ontouch(hit)
if hit.Parent:findFirstChild("Humanoid") then
print("Trigget working!")
James.Humanoid.Torso.CFrame = game.Workspace.OutOfhere.CFrame
script.Parent.CFrame = game.Workspace.SpawnLocation.CFrame
end
end
script.Parent.Touched:Connect(ontouch)
function ontouchexit()
Texte.Text = "Uh... We did it??"
wait(2)
nameq.Text = players.Name
Texte.Text = "Oh how we make it?"
wait(2)
nameq.Text = James.Name
Texte.Text = "Better, go home!"
wait(3)
nameq.Text = players.Name
Texte.Text = "Go!"
nameq.Text = James.Name
Texte.Text = "But go to my home!"
nameq.Text = players.Name
Texte.Text = "Nope"
nameq.Text = James.Name
Texte.Text = "Your choice, Your die, You can follow me, or not"
end
script.Parent.TouchEnded:Connect(ontouchexit)
and please, say what wrong with it, I want to finish a develop the place.