Hi. I am doing a 911 System. Look at this script:
button = script.Parent.Callbutton locationbox = script.Parent.LocationBox typeofemergencybox = script.Parent.EmergencyTypeBox describesittuationbox = script.Parent.DescribeSituationBox line1 = script.Parent.Parent.OperatorFrame.line1 line2 = script.Parent.Parent.OperatorFrame.line2 line3 = script.Parent.Parent.OperatorFrame.line3 line4 = script.Parent.Parent.OperatorFrame.line4 line5 = script.Parent.Parent.OperatorFrame.line5 line6 = script.Parent.Parent.OperatorFrame.line6 line7 = script.Parent.Parent.OperatorFrame.line7 location = nil typeofemergency = nil describesittuation = nil button.MouseButton1Click:connect(function() location = locationbox typeofemergency = typeofemergencybox describesittuation = describesittuationbox line1.Text = line2.Text line2.Text = line3.Text line3.Text = line4.Text line4.Text = line5.Text line5.Text = line6.Text line6.Text = line7.Text line7.Text = "%name%, ".."called for 911, Type Of Emergency: "..typeofemergency..", location: "..location..", Sittuation: "..describesittuation.."!" end)
It is using a Script not local script because I want it to happen serverside and not local. So then this error pops up:
16:53:07.877 - Players.iiLevelMaker.PlayerGui.ScreenGui.Main.Script:28: attempt to concatenate global 'describesittuation' (a userdata value)
You're trying to get the text from the variable typeofemergencybox
. When all that variable does is specify the location of EmergencyTypeBox, just add .Text
onto the end of your typeofemergencybox
variable (at the top) and it should work. Do the same for DescribeSituation
Also, use :Connect
instead of :connect
as that is deprecated.