Not placing tower but there is no errors

A helpful tip I learned: you are actually able to control gui using server scripts in this format:

One Player:

game.Players["somerandomguy123"].PlayerGui...

Multiple Players (not all):

local tableofplayers = {"someguy1", "anotherguy165", "imfreeeeee"}

for _, v in pairs(tableofplayers) do
game.Players[v].PlayerGui...
end

All Players:

for _, v in pairs(game.Players:GetPlayers()) do
v.PlayerGui...
end

Yep it stopped right when I hit play

ok, now uses a debbugs right on the function

Yep, It stopped when I clicked the button for the character.

Screenshot maybe? (Blah blah blah)

Please don’t mind the tower, my cousin made it.

Interesting, also the UI is not bad :slight_smile: just needs some improvements! Althought, try debbuging the " if texttospawn "

1 Like

Which one. There are many being used:
image_2023-08-08_195700637

Lol sorry

"If processed then
return
end

if towertospawn then
if input.UserInputType…"

It sent me straight to the if towerToSpawn then

What do you mean? He is actually doing a local script do just show that for him I guess.

1 Like

idk why I am doing it for the client side only.

1 Like

yea i mistook that as a placed tower not placeholder lol

3 Likes

Lol it is okey! (30 blah blah blah!)

I just want to ask, why do you call this twice?

1 Like

You want it appearing just for the client-side not for the entire server.

1 Like

I want it to appear for the entire server.

Uhh, then make it a serverScript?! Or make a remoteEvent to fire when player has been clicked on the thing to show the tower

Let’s separate the client/local scripts and split them into server scripts

only client side things remain in the client side scripts

1 Like

If I do then the gold to display the gold will give an error because it is not local anymore.