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!
Make it so it doesn’t give me a script error when I do “!crownhouse whateverherebanner” -
What is the issue? Include screenshots / videos if possible!
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Nothing so far, because it doesn’t show any warnings or errors for the script:
local PO = workspace.Mechanics
local Banners = PO.Banners
local RS = game:GetService("ReplicatedStorage")
local Modules = RS:WaitForChild("Modules")
local HouseModule = require(Modules:WaitForChild("Houses"))
local List = HouseModule.List
local HouseName = game.ReplicatedStorage:WaitForChild("Values"):WaitForChild("HouseName")
HouseName.Value = game:GetService("HttpService"):GetAsync("https://pastebin.com/raw/jbsiamGe")
wait(1)
function findData(HouseName,DataToFind)
for i,v in pairs(List) do
if v["Name"] == HouseName then
if v[DataToFind] then
return v[DataToFind]
end
end
end
end
function ChangeBanners()
for i,v in pairs(Banners:GetChildren())do
if v.Name == "Banner" and v:FindFirstChild("Sigil") then
if v.Sigil:FindFirstChild("Decal") then
v.Sigil.Decal.Texture = "rbxassetid://"..findData(HouseName.Value,"Sigil")
end
for i,v in pairs(v:GetChildren())do
if v:IsA("BasePart") and v.Name ~= "Wooden" and v.Name ~= "Sigil" then
v.BrickColor = findData(HouseName.Value,"Color")
end
end
end
end
end
HouseName.Changed:connect(function()
ChangeBanners()
end)
ChangeBanners()
game.Players.PlayerAdded:connect(function(Player)
Player.Chatted:connect(function(Message)
if Player.Name == "49dec" or Player.Name == "player1" then
if string.sub(Message,1,12) == "!crownhouse " then
HouseName.Value = string.sub(Message,13,string.len(Message))
elseif string.lower(Message) == "!updatebanners" then
HouseName.Value = game:GetService("HttpService"):GetAsync("https://pastebin.com/raw/4fzhDzGS")
end
end
end)
end)
Script ^