of     1   

BaconMan1455
#228085604Sunday, November 26, 2017 3:30 PM GMT

So I need some help. I’m trying to make a tsunami that moves across the map by CFraming, and destroys everything in its path. I’ve got the movement down but I can’t seem to figure out how to make it unanchor any parts it touches AND kill any players it touches. The farthest I’ve gotten is it moves through the map, not destroying anything, but when it touches a player all of the sudden every part it’s now touching unanchors. Hope you understand what I’m trying to say. Anyone know how to solve this?
Chrounum
#228085682Sunday, November 26, 2017 3:32 PM GMT

Well, Parts have a .Anchored Property, so set that to false, and also Either call :BreakJoints() on the model that the Tsunami touches, or find the Humanoid and set it's Health to Its health - its max health #code print("don't forget to dry the towel after use")
BaconMan1455
#228087971Sunday, November 26, 2017 4:13 PM GMT

Ok I'll try that and let you know what happens. Thanks!
BaconMan1455
#228088577Sunday, November 26, 2017 4:23 PM GMT

Ok so this is my script: ------------------------------------------------------------------------------------ local function WaveTouchPart(hit) while wait(.1) do if not hit.Parent:GetChildren("Humanoid") then local parts = script.Parent:GetTouchingParts() for i, part in pairs(parts) do if part.Name == "Part" and part.Anchored then part.Anchored = false end end else hit.Parent.Humanoid.Health = 0 end end end script.Parent.Touched:connect(WaveTouchPart) ------------------------------------------------------------------------------------ Now it only kills the player but does not unanchor any parts. Please keep in mind that I am a beginner scripter and am gonna need some help. XD
Chrounum
#228088769Sunday, November 26, 2017 4:26 PM GMT

I'm going to assume that the script is inside the wave. script.Parent.Touched:Connect(function(hit) local Human = Hit.Parent:FindFirstChild("Humanoid") if Human ~= nil then Human.Health = Human.Health - Human.MaxHealth end hit:BreakJoints() end) Hopeflly that works. #code print("don't forget to dry the towel after use")
BaconMan1455
#228089010Sunday, November 26, 2017 4:31 PM GMT

No it did not work. The city I'm trying to destroy is just a bunch of parts all in one model, is that the problem?
Chrounum
#228089372Sunday, November 26, 2017 4:37 PM GMT

Yea, hold on, I'll re-write it. script.Parent.Touched:Connect(function(hit) if hit.Parent:IsA("Model") then for i,v in pairs(hit.Parent:GetChildren()) do v:BreakJoints() end end local Human hit.Parent:FindFirstChild("Humanoid") if Human ~= nil then Human.Health = Human.Health - Human.MaxHealth end end) #code print("don't forget to dry the towel after use")
BaconMan1455
#228089671Sunday, November 26, 2017 4:42 PM GMT

That didn't work either. It does the same except this time it breaks the joints of the player to so your still alive just you don't have legs or arms lol. Tricky isn't it?
BaconMan1455
#228089939Sunday, November 26, 2017 4:46 PM GMT

I'm stumped.
Chrounum
#228090058Sunday, November 26, 2017 4:48 PM GMT

I feel like the answer is obvious but im not noticing it. #code print("don't forget to dry the towel after use")
BaconMan1455
#228090075Sunday, November 26, 2017 4:49 PM GMT

I know me too
BaconMan1455
#228090163Sunday, November 26, 2017 4:50 PM GMT

Maybe we could get some extra help. I'm gonna post this on script helpers and see if they can help then post the results here.

    of     1