Sorry if this is rude but could we go a bit faster? It is 8 at night for me.
no problem
ohmygodthisrobloxiscrazywithmodreation
Let’s start with UpdateGold()
Server
module.UpdateGold = function()
for _, player in pairs(game.Players:GetPlayers()) do
player.PlayerGui.pathtogoldtext.Text = player.Gold.Value
end
end
Done
robloxpleasegetbettermoderation
i’d like to know, do you have towers in rep storage, it’d be easier to clone them
You doing the local script module right?
yes
robloxpleasegetbettermoderation
the module is for both sides
30charrule
Nice, that’s useful then
30 lols
module.AddPlaceholderTower = function(name, player, removetower)
local towertoclone = game.ReplicatedStorage:FindFirstChild(name)
if towertoclone then
if removetower then
removetower:Destroy()
end
local tower = towertoclone:Clone()
--too lazy to write raycast
tower:SetPrimaryPartCFrame(result.Instance.Parent.CFrame)
for _, v in pairs(tower:GetDescendants()) do
if v:IsA("BasePart") then
v.Transparency = 0.3
v.Material = Enum.Material.ForceField
game:GetService("PhysicsService"):SetPartCollisionGroup(v, "Tower")
end
end
end
end
btw im on mobile so it takes a while for me to type
Do you want me to write the raycast? Like copy the code from the raycast script.
Also ok.
ye from cursor
meh
(remove30characterrule)
What?
asuihdashdjashjddasdasda
Hey @remcodesremcodes! Add:
if towertoclone and removetower then
removetower:Destroy()
end
instead of:
if towertoclone then
if removetower then
removetower:Destroy()
end; end
It can makes the script a little bit more organized.
Is there any easier way?
wadwadawdwad
What do you mean? If there is a easiest way to do the sanity check with and?
the script doesnt run if there isnt already a placeholder tower which then breaks placeholder system
Should I use chatgpt? I prob shouldn’t.
repeat wait() until removetower?
yeah dont
- aaaaaaaaaaaaaaaaaaaaa