#How can i fix my camera

1 messages · Page 1 of 1 (latest)

lost ivy
#

i was scripting did something wrong and now this happens

lost ivy
#

had to use this code in my gui which was messing up the team section

#

local player = game.Players.LocalPlayer
local ReplicatedStorage = game:GetService("ReplicatedStorage")

-- 1. Ensure the RemoteEvent exists before trying to use it
local remote = ReplicatedStorage:WaitForChild("EquipUniform")

local frame = script.Parent
local screenGui = frame.Parent

-- 2. This is crucial for your Battle System so the menu doesn't reappear on death
screenGui.ResetOnSpawn = false

-- 3. UI Button references
local franceBtn = frame:WaitForChild("FranceButton")
local germanyBtn = frame:WaitForChild("GermanyButton")
local russiaBtn = frame:WaitForChild("RussiaButton")

local function onSelect(country)
print("1. LocalScript: Player selected " .. country)

-- Fire the server to clone the specific R6 Rig (Uniform + Gear)
remote:FireServer(country)

print("2. LocalScript: Request sent to Server for deployment.")

-- Hide the UI immediately so the player can see the battlefield
frame.Visible = false 
screenGui.Enabled = false 

end

-- 4. Connections
franceBtn.MouseButton1Click:Connect(function()
onSelect("France")
end)

germanyBtn.MouseButton1Click:Connect(function()
onSelect("Germany")
end)

russiaBtn.MouseButton1Click:Connect(function()
onSelect("Russia")
end)