You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
There are GUIs, LocalScripts, and some Scripts that are not working in game, but are working in studio solo. I wish to fix it.
What is the issue? Include enough details if possible!
Up.
What solutions have you thought of so far?
I’ve looked for what allows LocalScripts to run and what doesn’t (their location, that is) and placed them in what seems to be the proper places - still do not work. Scripts are situated in ScriptService, where I think they should be, and only one script seems to work. Another does depend on receiving a remote call from a LocalScript to work (game is FilteringEnabled). As for GUIs, they’re in StarterGui as they should be.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Have you indexed some of your parts with :WaitForChild() and :FindFirstChild()? This can cause issues like these like it has in the past. Especially for me in the past. If you have, please post your code so we know what is broken.
Yea, I was looking to see if that’s one of the things I did, and no, the LocalScripts in GUIs use ‘script.Parent’ when referencing the copied-to-player GUI rather than the StarterGui.
The issue is, not even the GUIs are being copied over to the player, yet alone the LocalScripts (and one in particular that does some selection work).
There are 2 so far, thankfully I caught this right now, here’s one that just does hex selection and is not even registered.
local player = game:GetService(‘Players’).LocalPlayer
local mouse = player:GetMouse()
local userInputService = game:GetService(‘UserInputService’)
local replicatedStorage = game:GetService(‘ReplicatedStorage’)
local event = replicatedStorage.Remotes.ChangeSelected
local hex
local previousSelection = false
userInputService.InputBegan:Connect(function(input, gameProcessed)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if mouse.Target then
if mouse.Target.Name == ‘HexTile’ or mouse.Target.Name == ‘TileIdentifier’ then
hex = mouse.Target.Parent
end
end
end
if hex then
if hex:FindFirstChild('TileType') and hex.TileType.Value ~= nil then
if replicatedStorage.Nations:FindFirstChild(player.Name) and replicatedStorage.Nations:FindFirstChild(player.Name).Value == hex.HexTile.BrickColor.Name then
if hex.TileType.Value == 'City' or hex.TileType.Value == 'Fort' or hex.TileType.Value == 'Village' then
if player.PlayerGui.InteractGui.Enabled == false then
player.PlayerGui.InteractGui.Frame.HexTileName.Text = hex.Name
player.PlayerGui.InteractGui.SelectedHex.Value = hex.Name
event:FireServer(player.PlayerGui.InteractGui.SelectedHex.Value)
player.PlayerGui.InteractGui.Enabled = true
else
player.PlayerGui.InteractGui.Enabled = false
end
end
end
if not player.PlayerGui:FindFirstChild('SelectionBox') then
local selected = Instance.new('SelectionBox', player.PlayerGui)
selected.Adornee = hex.HexTile
selected.LineThickness = 0.1
elseif player.PlayerGui:FindFirstChild('SelectionBox') then
player.PlayerGui.SelectionBox:Destroy()
end
end
end
hex = nil
Did you commit the scripts?
Do so by going into view tab and pressing “Commit” or something similar and a new window will pop up and then select your script and press commit
That one is just local and meant for the client, it does not interact with any server script whatsoever.
Edit: Beyond the remote event fire. But, I still don’t understand why it doesn’t even come to that point? The event fire doesn’t do anything at the moment either, it could be commented.