I’m passing down a boolean through a remote event and it doesn’t have a value when I try to call it. How do i fix?
Mind showing your code, so we could see this
1 Like
I’m doing this to check if the player is shift locked when dashing:
local function DashRight()
local UserInputService = game:GetService("UserInputService")
if UserInputService.MouseBehavior == Enum.MouseBehavior.LockCenter then
local ShiftLockCheck = true
return ShiftLockCheck
else
local ShiftLockCheck = false
return ShiftLockCheck
end
end
And this to fire the server script
DashToggleRight:FireServer(DashRight)
and this in the server script to get the value
Remote.OnServerEvent:Connect(function(player, DashRight)
nvm I fixed it because for some reason you can’t pass down the returned value of a function so I just made a variable equal to the function by doing local SLTR = DashRight()
and then passed down that variable instead