also smooth set now doesn’t tween whenever i try to use it and uses default set, Do i need to use some functions in order to make it work or missing something here?
What seems to be a small mistake in the documentation thanks for pointing that out
Now for your :SmoothSet(), you have the seconds parameter set to 0 meaning it won’t have the “bounce/smooth effect”. To change this just set this to seconds parameter to something to your liking such as
-- :SmoothSet(spread, seconds, updateMin)
:SmoothSet(60, 1) -- will take 1 second to "bouncingly " set
If you have any other problems or this doesn’t work for you reply to this message!
could you shoot me a private message so we could further talk about this? Possibly with a place file and make sure the module is updated. Sorry for the inconvenience
No I don’t think this is related to GuiInset, was about to reach into dms to get this fixed but found where it just gets off where there is already an rendered crosshair.
I simply change it’s offset in the module after spotting it
Hi! I have recently discovered this module and thought it would be a great addition to my game. I made a quick gun using it and it went perfectly fine. Then I put it in my project but I keep getting this error and I don’t know why.
So whenever I would use :Shove() and then :Raycast(), the raycast would return nan nan nan, nan nan nan and I have no idea why as it worked previously when I first tried it out (this time I used it for my OTS gun system.) I fixed it by doing :Shove() after :Raycast() but I feel like it’s a pretty bad workaround. Also I have a function that when called in a module changes the spread per second and maximum, however every time I :Shove() it spreads to the max (even when 0).
Code:
Gui Module
local TweenService = game:GetService("TweenService")
local Gui = {}
local TweenProp = TweenInfo.new(0.2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
-- Main Part
local Player = game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
local Display = PlayerGui:WaitForChild("ApolloGUI")
function Gui:Toggle(bool: boolean)
Display.Enabled = bool
end
-- Crosshair Part
local DynamicCrosshair
if not DynamicCrosshair then
DynamicCrosshair =
require(game:GetService("ReplicatedStorage").ApolloShared.Modules.DynamicCrosshair).New(Display.Crosshair)
DynamicCrosshair:Disable()
DynamicCrosshair:Display({
BackgroundTransparency = 0,
BorderSizePixel = 1,
Image = nil,
ImageTransparency = 0,
BackgroundColor3 = Color3.fromRGB(255, 255, 255),
})
DynamicCrosshair:Size(8, 1)
DynamicCrosshair.Spreading.IncreasePerSecond = 1
end
function Gui:SetupSpread(Module)
DynamicCrosshair.Spreading.IncreasePerSecond = Module.Spread
DynamicCrosshair.Spreading.Max = Module.MaxSpread
end
function Gui:ToggleCrosshair(bool: boolean)
if bool then
DynamicCrosshair:Enable()
else
DynamicCrosshair:Disable()
end
end
function Gui:Raycast()
local Origin, Direction = DynamicCrosshair:Raycast()
return Origin, Direction
end
function Gui:Recoil()
DynamicCrosshair:Shove()
end
return Gui
If you know how to fix this it would be appreciated.