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
here is your fixed code
local player = game.Players:WaitForChild("Naderssrr") player.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) model2.Anchored = true local surface2 = Instance.new("SurfaceGui") surface2.Parent = model2 local 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 end)