#detecting input from script inside a model?

47 messages · Page 1 of 1 (latest)

silent dove
#

local scripts dont work under workspace

#

and uis cant be used in server scripts

silent dove
#

is the local script in the character

#

and the character is in the workspace

#

and local scripts dont work under workspace

#

as i fucking said

#

it does change shit that i said it

#

because you clearly didnt read it

#

put a server script in your tool

#

so then its just a model

#

why isnt it a tool

#

how would you expect to detect any clicks

elfin oasis
#

what do you want to do

silent dove
#

there are no exceptions

#

you dont put local scripts in workspace

elfin oasis
#

explain that

#

ok so

#

im about to help

elfin oasis
proud oak
#

localscripts dont work on workspace, it works under the character because it can get the player through the character, is dedicated just to that

#

so thats why it works

elfin oasis
#

is it still a tool?

#

ok so if your adding it the the player itself as a model then you could use something like UserInputService or getting the mouse of the player to detect a MouseButton1 input which you can then fire a shooting event or something

#

uis can work as well

brazen crescent
elfin oasis
#

it would be this:

local UIS = game:GetService("UserInputService")

UIS.InputBegan:Connect(function(input, gameproc)
  if gameproc then return end

  if input.UserInputType == Enum.UserInputType.MouseButton1 then
    print("Clicked")
  end
end)```
#

(cant remember if UserInputType.MouseButton1 is the correct spelling but it is probably close to it

brazen crescent
#

MouseButton1Click

proud oak
#

"nope" and now he waits until someone pass him another way

#

you can just search on roblox documentation

#

do something bro

#

where is your script in startercharacter??

brazen crescent
#

Oh I see, you're a moron

#

You clearly don't have the patience to study

proud oak
#

you should have learned that first day

brazen crescent
#

As I said

#

That's not how this channel works, people who code for others can be found at #💵︱hiring , this channel is to help people with troubleshooting errors with their code.

#

You're asking others to code for you buddy

#

People on this thread gave you a proper answer for how to do that, you ask "how" with the "meaning give me code that shows how". That's not this thread's goal.

#

That's because you didn't have the patience to study how it works in the first place.

#

That's enough time to research how that works

brazen crescent
#

You should begin with things that are more simple and easy to understand if you're that slow paced, I'm not going to assist a person on a topic that they're not trying to understand themselves first.

#

I'm not that much of a jerk person