Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Why wont my talk script work?

Asked by 10 years ago
01local sp = script.Parent
02 
03button = sp
04player = game.Players.LocalPlayer
05 
06msg = player.StarterGui.TextBox.TextLabel
07 
08msg.Visible=false
09 
10function Talk()
11        player.Torso.Anchored=false
12        msg.Visible=true
13        wait(3)
14        msg.Text="Logan: Nice to see you again."
15        wait(3)
View all 42 lines...

No output, but It just wont work. Why?

1 answer

Log in to vote
1
Answered by 10 years ago

It's playerGui not starterGui. Also, you are supposed to put these in a screen GUI. new structure:

1-- PlayerGui
2----ScreenGui
3------Button
4--------LocalScript(Below)
5------TextBox
6--------TextLabel
01local sp = script.Parent
02 
03button = sp
04player = game.Players.LocalPlayer
05 
06msg = player.PlayerGui.ScreenGui.TextBox.TextLabel
07 
08msg.Visible=false
09 
10function Talk()
11        player.Character.Torso.Anchored=false
12        msg.Visible=true
13        wait(3)
14        msg.Text="Logan: Nice to see you again."
15        wait(3)
View all 37 lines...

I've Tested it Again

0
BTW, I recommend you to replace s*** with #### (The roblox way), so you don't get banned RandomCraftER2002 0 — 10y
Ad

Answer this question