Hello, I was making a script that if you say “Nad is my best friend”, then it will make a sign saying “Me and nad are best friends!”. When I tried the script, it pulled up an error. Here is the script I’m into today:
while true do
game.Players.Naderssrr.Chatted:Connect(function(msg)
if msg == "Nad is my best friend" then
local model2 = Instance.new("Part")
model2.Parent = game.workspace
model2.Size = Vector3.new(36,32.2,2)
model.Anchored = true
surface2 = Instance.new("SurfaceGui")
surface2.Parent = model2
textla2 = Instance.new("TextLabel")
textla2.Parent = surface2
textla2.Size = UDim2.new(1,0,1,0)
textla2.Position = UDim2.new(0,0,0,0)
textla2.Visible = true
textla2.Text = "Me and nad are best friends!"
textla2.TextScaled = true
end)
wait()
end
Please help me you wonderful and brilliant scripters. Regarding, Naderssrr

4 comments
Show the error
And the while loop is not necessary
Why would you put a function connected to an event, in a while tru loop that never stops?
Why dont you indent your work, it makes thing a whole lot easier