I'm basic scripter, I don't really have knowledge of scripting names, vocabularies. On this function, I'm not sure what to add the last of function
Is it script.Parent.Changed:connect(replace)?
I'm sure Changed is normally for Values, but what about this one? Touched? Or? Please help me!! :(
function replace() if script.Parent.Parent.TKDoorOutside:FindFirstChild("Explosion") then workspace.NationalAssemblyAlarm.Toggle.Value = true wait(1) script.Parent.Parent.TKDoorOutside:Destroy() wait(1) game.ServerStorage.TKDoorOutside:Clone().Parent = game.workspace end end script.Parent.Touched:connect(replace)
This is just me personally, but instead of doing function replace()
or anything, i like to do something like this:
script.Parent.touched:connect(function(replace) -- code end)
With this line of code, you don't have to add the last bit script.Parent.Touched:connect(replace)
. That is just me personally, you can do it either way. But, like what BlueTaslem said, i don't really get what you are trying to accomplish. Reading what you have given, i believe this is what you are asking, but you have to be more specific in the future. Comment back if you need more help.