#detecting input from script inside a model?
47 messages · Page 1 of 1 (latest)
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
a few exceptions to this such as when its in the player
what do you want to do
then how do my local scripts inside of startercharacterscripts work? when i join the game my character is in workspace
explain that
ok so
im about to help
sorry if that sounded rude
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
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
Local scripts can work inside the character model
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
MouseButton1Click
"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??
.
you should have learned that first day
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
.
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