Stuck | Roblox Forum
Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

Stuck

  • This website was created by Roblox members to replace the official forums because Roblox shut them down! Join our community if you like to talk about Roblox!

Taveple

New Member
Jul 30, 2020
10
0
1
NA
Roblox
Taveple
Discord
jaakoup#8803
Is it possible for a part to detect the click of a tool and pursue an action, for example change the color? but only for that specific brick.
 

WizardOfHills

Active Member
Jul 21, 2018
579
113
43
Roblox
WizardOfHills
Mouse object has a nice property called Target. However, it appears that Mouse really works only in LocalScript. So again one needs to make an old trick with LocalScript accessing game.Players.LocalPlayer:GetMouse().Target and passing this value via a RemoteEvent to a Script. Then Script can apply change of colour for everyone to see.
 

Taveple

New Member
Jul 30, 2020
10
0
1
NA
Roblox
Taveple
Discord
jaakoup#8803
Mouse object has a nice property called Target. However, it appears that Mouse really works only in LocalScript. So again one needs to make an old trick with LocalScript accessing game.Players.LocalPlayer:GetMouse().Target and passing this value via a RemoteEvent to a Script. Then Script can apply change of colour for everyone to see.
do i put the local script in the tool with the remote event attached and then it connects to the proper script under the brick that i want to be changed? (im new to scripting, sorry)
 

WizardOfHills

Active Member
Jul 21, 2018
579
113
43
Roblox
WizardOfHills
I propose something like this. However, all kinds of setups may be considered. Anyway, I would keep RemoteEvent and Script together (unless RemoteEvent is in ReplicatedStorage where Scripts do not run.)
SwordSetup.jpg
 
General
Help Users
  • No one is chatting at the moment.
    Coolcatmomi Coolcatmomi: oh, 😔