Looking for how i can do this. Couldn't find any where else with an answer.
The button is in work space. The house is in lighting. How do i press the button to make the house appear in work space?
Looking for how i can do this. Couldn't find any where else with an answer.
The button is in work space. The house is in lighting. How do i press the button to make the house appear in work space?
I would not suggest using Lighting as the service to use for spawning parts, it is easily configurable by just moving your house to replicatedstorage, and instead of game.Lighting, do game.ReplicatedStorage, however, for your question, just add a clickdetector onto the button and do the following.
local Detect = script.parent.ClickDetector
Detect.MouseClick:connect(function()
game.Lighting.House.Clone().Parent = game.Workspace
end)
--Note to use a server script instead of local,
local thing = script.Parent.ClickDetector
local house = game.Lighting:FindFirstChild("House")
thing.MouseClick:connect(function(aaaaaa)
house.Parent = game.Workspace
end)
It spawns the house but it falls apart..
anchor the house
I can't find out how to anchor the house because it's made up of many parts grouped together.
Also, i can't anchor the house because i need to be able to destroy it with a rocket launcher.
house.Anchored = true. the rocket launcher can still destroy the house.
Hey. The house still falls apart when it spawns.
Did you anchor it? it shouldn't fall apart when it spawns.
Yes i did.
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
Wouldn't it be game.Lighting.House:Clone().Parent - game.Workspace?
I tested it straight up in studio, how do you expect to get the House from lighting, move it into workspace by subtracting? Just curious.
It's not spawning the house from lighting... Do i put that script into a brick with a click detector?
If you are still having trouble,, sorry about the LATE reply, but please be more clear as to your issue, and I'll walk you through it.
It wasn't working at first using your script but then i changed ".clone" to ":clone" and it worked. But the house falls apart when it spawns.