Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

When i go on my morph pad I don't move?

i dont move when i touch the pad i got the scripit of youtube so idk if it good or bad

1 answer

You... didn't provide a script.

I'm sure it's fine, I'll add code for you.

Make sure you put a script in the part and remove your previous morph pad.

Get the character you want to morph and put it inside ServerStorage. Make sure the model is unanchored!

local part = script.Parent
local debounce = false
local CharacterToMorph = game.ServerStorage.NameHere -- Replace NameHere with the name of your character in serverstorage.

script.Parent.Touched:Connect(function(hit) -- Fires a .Touched function
	if hit.Parent then -- Checks if the hit argument we have has a parent
		if hit.Parent:FindFirstChild("Humanoid") then -- Checks if the hit argument's parent has a Humanoid
			local plr = game.Players:FindFirstChild(hit.Parent.Name) -- Searches for a player in the Players service with a matching name to the hit argument's parent

			if plr and debounce == false then -- Checks if the player exists and also checks if debounce is false
				debounce = true
				 local c = CharacterToMorph:Clone() -- Clones the character we need to morph
			        c.Name = plr.Name -- Names the clone the same as the player's name
			        plr.Character = c -- Sets the player's character as the clone

				wait(5) -- Change 5 to how long you want the wait to be when it's interactable again

				debounce = false -- Sets debounce to false so it is usable again

			end
		end
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.