RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Can you write me a script that turns a player into a goblin when touching a part?"
-- server script local part = script.Parent local function turnIntoGoblin(otherPart) local player = game.Players:FindFirstChild(otherPart.Parent.Name) if player then local character = player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None local goblinModel = game.ServerStorage.GoblinModel:Clone() goblinModel.Parent = character goblinModel.HumanoidRootPart.CFrame = character.HumanoidRootPart.CFrame character.HumanoidRootPart:Destroy() end end end end part.Touched:Connect(turnIntoGoblin)