|
| 20 Mar 2014 03:18 AM |
Okay so let's say you have a skill that makes you go invisible by pressing e then you have a text box and once you change that text box's text to r the skill that makes you go invisible changes to r and it's not e any more. I need a script to do that and yes I know no one script for people here so i'm asking for the part of the script where you change the text and it makes the ability what ever you want it to just a little part or if some one is willing to help me with the whole script that would be great.
~~All Memories Will Be Lost In Time~~ |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 03:28 AM |
SLOW DOWN Speak english! Wtf man!
plr = game.Players.LocalPlayer mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key) if key == "a" then --let's say its a for now plr.PlayerGui.ScreenGui.TextLabel.Text = "a" end end)
mouse.KeyUp:connect(function(key) if key == "a" then --again,assuming the key is "a" plr.PlayerGui.ScreenGui.TextLabel.Text = "b" end end) |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 03:30 AM |
| Oh hey man it's you again you're a nice person I like you can we be friends best friends cough cough my own private scripter of epicness cough cough. Lol jk let me see if I can work with this script. xD |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 03:38 AM |
| Oh I see what you're doing this is what I wanted I basicly wanted it to where if you went TO the text box and changed it yourself the key in the script would change. but I could probably edit some stuff around. |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 03:39 AM |
if key == plr.PlayerGui.ScreenGui.TextBox.Text then
:p |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 03:42 AM |
Wait,using what I just posted will error if its more than 1..
Gui = plr.PlayerGui Sg = Gui.ScreenGui Tb = Sg.TextLabel
if string.len(Tb.Text) == 1 and tostring(Tb.Text) or tonumber(Tb.Text) then--not sure if key == Tb.Text then |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 03:48 AM |
| Lol I was just doing something myself I should have checked this sooner okay let me see if that works. |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 03:54 AM |
Should it look something like this so far?
plr = game.Players.LocalPlayer Gui = plr.PlayerGui Sg = Gui.Skills.HD1.HD2.Mframe.Functions.AstralBind Tb = Sg.Skill1
mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key) if key == "a" then --let's say its a for now plr.PlayerGui.ScreenGui.TextLabel.Text = "a" end end)
mouse.KeyUp:connect(function(key) if key == "a" then --again,assuming the key is "a" plr.PlayerGui.ScreenGui.TextLabel.Text = "b" end end)
if string.len(Tb.Text) == 1 and tostring(Tb.Text) or tonumber(Tb.Text) then--not sure if key == Tb.Text then end end
|
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 03:56 AM |
My bad like this?
plr = game.Players.LocalPlayer Gui = plr.PlayerGui Sg = Gui.Skills.HD1.HD2.Mframe.Functions.AstralBind Tb = Sg.Skill1
mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key) if key == "a" then end end)
if string.len(Tb.Text) == 1 and tostring(Tb.Text) or tonumber(Tb.Text) then--not sure if key == Tb.Text then end end
|
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:10 AM |
Right under the If key == "a" Move the two ends to the very bottom |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:12 AM |
Take out if key == "a" And remove one end |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:16 AM |
| And what should I change the text to 1? |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:18 AM |
Your not making sence Just do as I posted,it already checks what the key is |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:18 AM |
Well it's not working this is what I have so far.
plr = game.Players.LocalPlayer Gui = plr.PlayerGui Sg = Gui.Skills.HD1.HD2.Mframe.Functions.AstralBind Tb = Sg.Skill1
mouse = plr:GetMouse() mouse.KeyDown:connect(function(key) if key == "" then
if string.len(Tb.Text) == 1 and tostring(Tb.Text) or tonumber(Tb.Text) then--not sure if key == Tb.Text then end end end end) |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:19 AM |
| Oh hold on I think I see the problem. |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:20 AM |
Take Out The Entire Line That Says if key == ""--REMOVE THIS LINE,GET RID OF IT
And then remove an end |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:24 AM |
Ya that's what I seen but still doesn't work
plr = game.Players.LocalPlayer Gui = plr.PlayerGui Sg = Gui.Skills.HD1.HD2.Mframe.Functions.AstralBind Tb = Sg.Skill1
mouse = plr:GetMouse() mouse.KeyDown:connect(function(key) if string.len(Tb.Text) == 1 and tostring(Tb.Text) or tonumber(Tb.Text) then--not sure if key == Tb.Text then print("WORKS!") end end end) |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Mar 2014 05:06 AM |
Ok,change the entire function to this:
mouse.KeyDown:connect(function(key) ypcall(if key == Tl.Text then print "yay!") end)
Ypcall should make sure it doesn't error,if it does,it'll continue still |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Mar 2014 03:05 PM |
| That has the red line under it and I tried fixing it but can't I canged ypcall to pcall and changed the other thing to Tb but it still has a red line under it. |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 03:11 PM |
| Oh okay it will make sure it doesn't error ._. |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Mar 2014 03:15 PM |
Change this line ypcall(if key == Tb.Text then print "yay") To
ypcall(if key == Tb.Text then print "yay" end)--I forgot an end |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 03:18 PM |
plr = game.Players.LocalPlayer Gui = plr.PlayerGui Sg = Gui.Skills.HD1.HD2.Mframe.Functions.AstralBind Tb = Sg.Skill1
mouse = plr:GetMouse() mouse.KeyDown:connect(function(key) ypcall(if key == Tb.Text then print "yay!") end end) |
|
|
| Report Abuse |
|
|