You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want the player to start taking damage after time after morphing
What is the issue? Include screenshots / videos if possible!
I can’t find out how to make the player take damage after morphing
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have searched Google, Devforum, Youtube, and tried making scripts. Keep in mind I have little to no knowledge in scripting
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
This is my morphing script it makes it so when you click a part you morph i used a tutorial
-- local Model = script.Parent:FindFirstChildOfClass("Model")
local ModelName = Model.Name
local ClickToMorph = script.Parent.ClickToMorph
local ClickDetector = ClickToMorph.ClickDetector
local ServerStorage = game:GetService("ServerStorage")
local Morphs = ServerStorage.Morphs
ClickDetector.MouseClick:Connect(function(plr)
local Character = plr.Character
local Root = plr.Character:FindFirstChild("HumanoidRootPart")
local MorphCharacter = Morphs:FindFirstChild(ModelName):clone()
MorphCharacter.HumanoidRootPart.CFrame = Root.CFrame
plr.Character = MorphCharacter
Character:Destroy()
MorphCharacter.Parent = workspace
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
-- local Model = script.Parent:FindFirstChildOfClass("Model")
local ModelName = Model.Name
local ClickToMorph = script.Parent.ClickToMorph
local ClickDetector = ClickToMorph.ClickDetector
local ServerStorage = game:GetService("ServerStorage")
local Morphs = ServerStorage.Morphs
ClickDetector.MouseClick:Connect(function(plr)
local Character = plr.Character
local Root = plr.Character:FindFirstChild("HumanoidRootPart")
local MorphCharacter = Morphs:FindFirstChild(ModelName):clone()
MorphCharacter.HumanoidRootPart.CFrame = Root.CFrame
Character:Destroy()
plr.Character = MorphCharacter
MorphCharacter.Parent = workspace
while wait(5) do
plr.Character:FindFirstChild("Humanoid"):TakeDamage(5)
plr.Character:FindFirstChild("Humanoid").Died:Connect(function()
break
end)
end
end)