so im trying to make a game like Clash of Clans also known as (CoC) that when you activate a gui button and click where ever you want a zombie will spawn
COMMUNITY QUESTION
how to make gui button zombie spawner?
1 answer
My idea
You should put the zombie into the ServerStorage, clone it and put it in the workspace
Steps
Step 1: Put the zombie in the ServerStorage
Step 2: Make sure that you have your Gui already, creat a local script in the button
Steps 3: Coding (put the code in the local script)
Script
local zombie = game.ReplicatedStorage.Zombie --the zombie
local button = script.Parent --the button
button.MouseButton1Click:Connect(function()
zombie:Clone().Parent = workspace --no need to be game.Workspace
end)
Hope i helped you!
This discussion is preserved as it was. New answers, comments, and votes are closed.
