So I want it to shift lock when I equip and when I unquip
#PLS HELP
1 messages · Page 1 of 1 (latest)
U
you want it to unshift lock when unequiped?
yes
or
no
?
?
?
@zenith remnant
Sup
Yes, make it when I equip it shift locks
And when I unequip it unshifts
Using its own camera system tho
It’s really good
.
hello need help
@zenith remnant
Yes
Yes pls I do
Ok so you want shiftlock when equipped right?
What you want to do is lock mouse using a if statement
So
if aim then
—aimcode
else
—disconnect code
end
To make aim code do it like this
Local connection
if aim then
Connection = runservice loop
— inside loop make character look at code
else
Connection = nil
— disconnect
end
Ok understand? @zenith remnant
Nah bro
The weapon only
And I know scripting I tired editing it
And it breaks
I asked over 6 people
And no one knows
This weapon
I beg you if you can record and show how to do
This is how you do it
Inside the loop you add code that makes HumanoidRootPart rotate on y axis to look where you want
Look at dev forums it will help
But depending on people for code is not how you make it into the big coding projects
Ok? @zenith remnant
I wasn’t depending it’s just the weapon broke every time I edit it
Wdym
** You are now Level 5! **
Cause when you said this I thought you where editing the body
Not the root which makes the rotate
Nah I was editing the script dude
Oh I see
The script line (this one specifically) made it so the weapon shift locks
Wait
but when I tried to make it only shift lock when I hold out the weapon
?
I got you just wait
Ok
I made it a module for this
YESSSSS
Open access
pls give
When I give you this module, I want you to study it
ok
After will give you a quiz, cause I need you to learn
ok man
U got it?
ye wait
inside Replicated storage put the module
local Modules = game:GetService("ReplicatedStorage")
local MobileCameraFramework = require(Modules.LockCharacterToCam)
MobileCameraFramework.ToggleShiftLock(players.LocalPlayer, true)
then do this
you can make it false to turn it off
@zenith remnant
Thanks so much dude
If it works imma tell u
What about this
local Modules = game:GetService("ReplicatedStorage")
this gets the service
local MobileCameraFramework = require(Modules.LockCharacterToCam)
this gets module inside service
I put it in local modules
What
MobileCameraFramework.ToggleShiftLock(players.LocalPlayer, true)
this is a on/off
and no
the file is the code
just add a module script
Ok
and put the code inside
Got it
Look imma try to do it
And when I do something wrong I come back to you (if you can help)
you can do
tool.Equiped:connect(function()
MobileCameraFramework.ToggleShiftLock(players.LocalPlayer, true)
end)
works like a dime
i did what u said
and i messed up somewhere and soehow
can you pls like make a short video of ur self putting it togther?
idfk dude
add a local script inside tool
then do local tool = script.parent
then
tool.Equiped:connect(function()
MobileCameraFramework.ToggleShiftLock(players.LocalPlayer, true)
end)
and you can do
tool.UnEquiped:connect(function()
MobileCameraFramework.ToggleShiftLock(players.LocalPlayer, false)
end)
and remember to define the module
remeber to add the text into a module
and name the module LockCharacterToCam