working but roblox bug and fix respawning issues on the client

This commit is contained in:
2024-04-22 20:12:48 -04:00
parent 431ec165b8
commit cb0d1d44dc
6 changed files with 56 additions and 51 deletions

View File

@@ -9,10 +9,10 @@ local Storage = game:GetService("ReplicatedStorage")
local RS = game:GetService("RunService")
--Production--
--if not RS:IsStudio() then
RS.RenderStepped:Wait()
if not RS:IsStudio() then
task.wait(.5)
script.Parent.Parent = nil
--end
end
--
local UI = script:WaitForChild("UI")
@@ -58,9 +58,6 @@ local Vignette = VignetteSettings.constructor(PlayerGui)
local Camera = CameraSettings.constructor(CurrentCamera, Player)
local Crosshair = CrosshairSettings.constructor(PlayerGui)
LoadCharacter(PlayerCharacter)
Player.CharacterAdded:Connect(LoadCharacter)
--Keybinds
local function CameraBinds()
local CameraBindMap = KeyBindsModule.constructor(false)
@@ -74,8 +71,8 @@ local function CameraBinds()
end
local function Crosshair3DEffect()
local RootVelocity = Instance.new("BindableEvent") :: BindableEvent
RootVelocity.Name = "RootVelocity"
local RootVelocity = Instance.new("BindableEvent") :: BindableEvent
RootVelocity.Name = "RootVelocity"
RootVelocity.Parent = ClientStorage
RootVelocity.Event:Connect(function(RootVelocity: Vector3)
@@ -90,4 +87,7 @@ Crosshair:Enable()
HealthSettings:Enable()
CameraBinds()
Crosshair3DEffect()
Crosshair3DEffect()
LoadCharacter(PlayerCharacter)
Player.CharacterAdded:Connect(LoadCharacter)