Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Equipped Event & Connect a function which will chat, help?

This is probably the most easiest questien, but I am a derp and have no knowledge of lua or scripting (yet).

Do anyone know how to this? Example I hold a sword (or any tool in general) and I press T and from my head it says like "T" (or any word).

2 comments

0

You seriously should've learnt some basic lua first, but anyhow, since it is Christmas, I'll write a little something. Won't be a full script on what you're requesting.

0

Yeh I know... I plan to, but I don't plan to be a scipter or ful time builder as I'm like 20 and need a life n such.

1 answer

✓ Accepted answer

Simply detects when the 'T' key on the keyboard has been pressed. This should give you a start, try testing this by inserting a LocalScript into StarterGui.

local UIS = game:GetService("UserInputService") -- grabs userinputservice

UIS.InputBegan:connect(function(input, _) -- recognizes input is being given
    if input.KeyCode == Enum.KeyCode.T then -- checks to see if the key pressed was the 'T' key
        print("T pressed") -- outputs to console (hit F9)
    end
end)

5 comments

0

But the goal is to make it appear at my characer's head.

0

You never gave an example of an attempt. Although, it's Christmas, I'll write it up for you in a bit, okay?

0

I did check it out and it didn't appear in the chat or above my character's head and thanks.

0

It's not supposed to. This was an example, as you didn't provide any attempted code. :c

0

I know, sorry... but I explained what I wanted in the most detail I could manage.

This discussion is preserved as it was. New answers, comments, and votes are closed.